update So 24. Mai 21:31:01 CEST 2020

This commit is contained in:
Robert Richter 2020-05-24 21:31:01 +02:00
parent 9225567906
commit 44b3c50816
3 changed files with 21 additions and 13 deletions

View File

@ -11,7 +11,7 @@ app_cfg.global = {
mediapath: '/media/', mediapath: '/media/',
time_to_delete_waip: 60, time_to_delete_waip: 60,
default_time_for_standby: 10, default_time_for_standby: 10,
circumcircle: 5,
defaultuser: 'me', defaultuser: 'me',
defaultpass: '123', defaultpass: '123',
defaultuserip: '127.0.0.1', defaultuserip: '127.0.0.1',

View File

@ -24,20 +24,28 @@ module.exports = function(app, sql, uuidv4, app_cfg, passport, auth, waip, udp)
// Impressum // Impressum
app.get('/impressum', function(req, res) { app.get('/impressum', function(req, res) {
if (app_cfg.public.ext_imprint) {
res.redirect(app_cfg.public.url_imprint);
} else {
res.render('imprint', { res.render('imprint', {
public: app_cfg.public, public: app_cfg.public,
title: 'Impressum', title: 'Impressum',
user: req.user user: req.user
}); });
};
}); });
// Datenschutzerklaerung // Datenschutzerklaerung
app.get('/datenschutz', function(req, res) { app.get('/datenschutz', function(req, res) {
if (app_cfg.public.ext_privacy) {
res.redirect(app_cfg.public.url_privacy);
} else {
res.render('privacy', { res.render('privacy', {
public: app_cfg.public, public: app_cfg.public,
title: 'Datenschutzerklärung', title: 'Datenschutzerklärung',
user: req.user user: req.user
}); });
};
}); });
/* ##################### */ /* ##################### */

View File

@ -51,7 +51,7 @@ module.exports = function (db, uuidv4, turf, app_cfg) {
var wgs_y = parseFloat(content.ortsdaten.wgs84_y); var wgs_y = parseFloat(content.ortsdaten.wgs84_y);
var point = turf.point([wgs_y, wgs_x]); var point = turf.point([wgs_y, wgs_x]);
var buffered = turf.buffer(point, 1, { var buffered = turf.buffer(point, 1, {
steps: 5, steps: app_cfg.global.circumcircle,
units: 'kilometers' units: 'kilometers'
}); });
var bbox = turf.bbox(buffered); var bbox = turf.bbox(buffered);
@ -59,7 +59,7 @@ module.exports = function (db, uuidv4, turf, app_cfg) {
bbox: bbox bbox: bbox
}); });
var new_buffer = turf.buffer(new_point, 1, { var new_buffer = turf.buffer(new_point, 1, {
steps: 5, steps: app_cfg.global.circumcircle,
units: 'kilometers' units: 'kilometers'
}) })
content.ortsdaten.wgs84_area = JSON.stringify(new_buffer); content.ortsdaten.wgs84_area = JSON.stringify(new_buffer);