important label typo fix
This commit is contained in:
parent
92a8a99359
commit
b86026d570
@ -2,9 +2,16 @@ let express = require('express');
|
|||||||
let router = express.Router();
|
let router = express.Router();
|
||||||
let passwd = 'insecure';
|
let passwd = 'insecure';
|
||||||
|
|
||||||
|
let low = require('lowdb'),
|
||||||
|
config = low('config.json');
|
||||||
|
|
||||||
|
let tbdLabel = config.get('mainConfig').chain().find({ param: 'tbdLabel' }).value()['value'];
|
||||||
|
let byeLabel = config.get('mainConfig').chain().find({ param: 'byeLabel' }).value()['value'];
|
||||||
|
|
||||||
|
|
||||||
/* GET home page. */
|
/* GET home page. */
|
||||||
router.get('/', function(req, res, next) {
|
router.get('/', function(req, res, next) {
|
||||||
res.render('index', { mainHeader: '🍺🍺🍺 Aktueller Spielstand 🍺🍺🍺🍺', TBD:'???', NoTeam:'Kein Team' });
|
res.render('index', { mainHeader: '🍺🍺🍺 Aktueller Spielstand 🍺🍺🍺🍺', TBD:tbdLabel, NoTeam:byeLabel });
|
||||||
});
|
});
|
||||||
|
|
||||||
router.get('/login', function(req, res, next) {
|
router.get('/login', function(req, res, next) {
|
||||||
@ -31,7 +38,7 @@ router.get('/admin', function(req, res, next) {
|
|||||||
console.log(req.session.passwd);
|
console.log(req.session.passwd);
|
||||||
console.log(req.session);
|
console.log(req.session);
|
||||||
if(req.session.passwd=='insecure'){
|
if(req.session.passwd=='insecure'){
|
||||||
res.render('admin', { mainHeader: 'Admin Interface', TBD:'???', NoTeam:'Kein Team' });
|
res.render('admin', { mainHeader: 'Admin Interface', TBD:tbdLabel, NoTeam:byeLabel });
|
||||||
}else{
|
}else{
|
||||||
res.redirect('/login');
|
res.redirect('/login');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user