Routen für Test-Alarm
This commit is contained in:
parent
9b28e3408d
commit
b4355df111
@ -1,4 +1,4 @@
|
|||||||
module.exports = function(app, sql, app_cfg, passport, auth) {
|
module.exports = function(app, sql, app_cfg, passport, auth, udp) {
|
||||||
|
|
||||||
// get index
|
// get index
|
||||||
app.get('/', function(req, res) {
|
app.get('/', function(req, res) {
|
||||||
@ -64,10 +64,10 @@ module.exports = function(app, sql, app_cfg, passport, auth) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// get /ueber
|
// get /help
|
||||||
app.get('/ueber', function(req, res) {
|
app.get('/help', function(req, res) {
|
||||||
res.render('ueber', {
|
res.render('help', {
|
||||||
title: 'Über',
|
title: 'Hilfe',
|
||||||
user: req.user
|
user: req.user
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -121,6 +121,18 @@ module.exports = function(app, sql, app_cfg, passport, auth) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// get /test_alert
|
||||||
|
app.get('/test_alert', auth.ensureAdmin, function(req, res) {
|
||||||
|
res.render('test_alert', {
|
||||||
|
title: 'Test-Alarm',
|
||||||
|
user: req.user,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
app.post('/test_alert', auth.ensureAdmin, function(req, res) {
|
||||||
|
udp.send_message(req.body.test_alert);
|
||||||
|
});
|
||||||
|
|
||||||
// get /edit_users
|
// get /edit_users
|
||||||
app.get('/edit_users', auth.ensureAdmin, function(req, res) {
|
app.get('/edit_users', auth.ensureAdmin, function(req, res) {
|
||||||
sql.db_get_users(function(data) {
|
sql.db_get_users(function(data) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user