mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 01:43:43 +00:00
feat: reload on change
This commit is contained in:
@@ -39,6 +39,7 @@ function getEventEvents() {
|
||||
.value();
|
||||
}
|
||||
|
||||
// Updates timer object
|
||||
function _updateTimers() {
|
||||
const results = getEventEvents();
|
||||
global.timer.updateEventList(results);
|
||||
@@ -181,6 +182,11 @@ exports.eventsDelete = async (req, res) => {
|
||||
const c = _getEventsCount();
|
||||
const e = db.get('events').find({ id: req.params.eventId }).value();
|
||||
|
||||
if (e == null) {
|
||||
res.status(400).send(`No match`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (c > 0 && e.order < c) incrementFrom(e.order, -1);
|
||||
|
||||
// add new event
|
||||
|
||||
Reference in New Issue
Block a user