Cleanup, comments, removed ejs stuff
This commit is contained in:
@@ -5,6 +5,10 @@ const io = require('../controllers/socketio');
|
||||
const timer = require('../controllers/timer');
|
||||
const score = require('../controllers/score');
|
||||
|
||||
// ######################################################################################################################################################
|
||||
// General endpoints
|
||||
// ######################################################################################################################################################
|
||||
|
||||
// Express router endpoint to trigger a frontend refresh on all connected sockets
|
||||
router.get('/refreshMonitor', function(req, res, next) {
|
||||
console.log("Monitor neu geladen");
|
||||
@@ -13,6 +17,10 @@ router.get('/refreshMonitor', function(req, res, next) {
|
||||
res.send(); // send empty response
|
||||
});
|
||||
|
||||
// ######################################################################################################################################################
|
||||
// Timerendpoints
|
||||
// ######################################################################################################################################################
|
||||
|
||||
// Express router entpoint to start the timer
|
||||
router.get('/timerStart', function(req, res, next) {
|
||||
if(timer.start()) { // If successfully started the timer
|
||||
@@ -51,6 +59,10 @@ router.get('/timerGetValues', function(req, res, next) {
|
||||
res.json(timer.getValues()); // Respond with important values for frontend
|
||||
});
|
||||
|
||||
// ######################################################################################################################################################
|
||||
// Scoreboard endpoints
|
||||
// ######################################################################################################################################################
|
||||
|
||||
// Express router endpoint to toggle the scoreboard
|
||||
router.get('/scoreToggle', function(req, res, next) {
|
||||
if(score.getEnabled()) { // If scoreboard enabled
|
||||
|
||||
Reference in New Issue
Block a user