From 44b3c50816a25f2d9c8ba947066b7ee97359a902 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Sun, 24 May 2020 21:31:01 +0200 Subject: [PATCH] update So 24. Mai 21:31:01 CEST 2020 --- server/app_cfg.js | 2 +- server/routing.js | 28 ++++++++++++++++++---------- server/sql_qry.js | 4 ++-- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/server/app_cfg.js b/server/app_cfg.js index c77ef8e..d91c838 100644 --- a/server/app_cfg.js +++ b/server/app_cfg.js @@ -11,7 +11,7 @@ app_cfg.global = { mediapath: '/media/', time_to_delete_waip: 60, default_time_for_standby: 10, - + circumcircle: 5, defaultuser: 'me', defaultpass: '123', defaultuserip: '127.0.0.1', diff --git a/server/routing.js b/server/routing.js index 82c4e8d..94cb907 100755 --- a/server/routing.js +++ b/server/routing.js @@ -24,20 +24,28 @@ module.exports = function(app, sql, uuidv4, app_cfg, passport, auth, waip, udp) // Impressum app.get('/impressum', function(req, res) { - res.render('imprint', { - public: app_cfg.public, - title: 'Impressum', - user: req.user - }); + if (app_cfg.public.ext_imprint) { + res.redirect(app_cfg.public.url_imprint); + } else { + res.render('imprint', { + public: app_cfg.public, + title: 'Impressum', + user: req.user + }); + }; }); // Datenschutzerklaerung app.get('/datenschutz', function(req, res) { - res.render('privacy', { - public: app_cfg.public, - title: 'Datenschutzerklärung', - user: req.user - }); + if (app_cfg.public.ext_privacy) { + res.redirect(app_cfg.public.url_privacy); + } else { + res.render('privacy', { + public: app_cfg.public, + title: 'Datenschutzerklärung', + user: req.user + }); + }; }); /* ##################### */ diff --git a/server/sql_qry.js b/server/sql_qry.js index a0adc7d..a314b5a 100755 --- a/server/sql_qry.js +++ b/server/sql_qry.js @@ -51,7 +51,7 @@ module.exports = function (db, uuidv4, turf, app_cfg) { var wgs_y = parseFloat(content.ortsdaten.wgs84_y); var point = turf.point([wgs_y, wgs_x]); var buffered = turf.buffer(point, 1, { - steps: 5, + steps: app_cfg.global.circumcircle, units: 'kilometers' }); var bbox = turf.bbox(buffered); @@ -59,7 +59,7 @@ module.exports = function (db, uuidv4, turf, app_cfg) { bbox: bbox }); var new_buffer = turf.buffer(new_point, 1, { - steps: 5, + steps: app_cfg.global.circumcircle, units: 'kilometers' }) content.ortsdaten.wgs84_area = JSON.stringify(new_buffer);