Added config team functionality, receive them from backend to update frontend, Added scoreswitch
This commit is contained in:
@@ -107,6 +107,13 @@ router.get('/scoreClearScore', function(req, res, next) {
|
||||
res.json(score.getValues()); // Respond with important values for frontend
|
||||
});
|
||||
|
||||
router.post('/scoreConfigTeams', function(req, res, next) {
|
||||
score.configTeam("teamA", req.body.teamA.name, req.body.teamA.name2, req.body.teamA.isSpielgemeinschaft);
|
||||
score.configTeam("teamB", req.body.teamB.name, req.body.teamB.name2, req.body.teamB.isSpielgemeinschaft);
|
||||
console.log(score.getValues());
|
||||
res.json(score.getValues());
|
||||
});
|
||||
|
||||
/* GET home page. */
|
||||
router.get('/', function(req, res, next) {
|
||||
res.render('admin');
|
||||
|
||||
Reference in New Issue
Block a user