Added config team functionality, receive them from backend to update frontend, Added scoreswitch

This commit is contained in:
2024-05-28 22:59:36 +02:00
parent faaa47a792
commit 835248a9dc
6 changed files with 106 additions and 19 deletions
+7
View File
@@ -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');