Added comments and readme

This commit is contained in:
Julian Appel 2026-04-10 22:16:51 +02:00
parent 1d632252bf
commit e25c8606d9
8 changed files with 252 additions and 16 deletions

View file

@ -55,8 +55,9 @@ router.post('/timerReset', function(req, res, next) {
res.json(timer.getValues()); // Respond with all important values to update the frontend
});
// Express router endpoint to increase or decrease the timer by a value in seconds
router.post('/timerIncDec', function(req, res, next) {
timer.incDec(req.body.value);
timer.incDec(req.body.value); // Positive Werte = erhöhen, negative Werte = verringern
res.json(timer.getValues());
});
@ -116,6 +117,7 @@ router.get('/scoreClearScore', function(req, res, next) {
res.json(score.getValues()); // Respond with important values for frontend
});
// Express router endpoint to configure both teams (name, name2, Spielgemeinschaft-flag)
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);