mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 04:43:35 +00:00
refract: delete event
This commit is contained in:
@@ -61,6 +61,11 @@ function _updateTimersSingle(id, entry) {
|
||||
global.timer.updateSingleEvent(id, entry);
|
||||
}
|
||||
|
||||
// Delete a single entry in timer object
|
||||
function _deleteTimerId(entryId) {
|
||||
global.timer.deleteId(entryId);
|
||||
}
|
||||
|
||||
// Create controller for GET request to '/events'
|
||||
// Returns -
|
||||
exports.eventsGetAll = async (req, res) => {
|
||||
@@ -281,7 +286,7 @@ exports.eventsDelete = async (req, res) => {
|
||||
_removeById(req.params.eventId);
|
||||
|
||||
// update timer
|
||||
_updateTimers();
|
||||
_deleteTimerId(req.params.eventId);
|
||||
|
||||
res.sendStatus(201);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user