mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-12 20:59:41 -06:00
Added missing await
This commit is contained in:
@@ -215,9 +215,9 @@ const editMonitor = async (req, res, next) => {
|
||||
try {
|
||||
const editedMonitor = await req.db.editMonitor(req, res);
|
||||
// Delete the old job(editedMonitor has the same ID as the old monitor)
|
||||
req.jobQueue.deleteJob(editedMonitor);
|
||||
await req.jobQueue.deleteJob(editedMonitor);
|
||||
// Add the new job back to the queue
|
||||
req.jobQueue.addJob(editedMonitor._id, editedMonitor);
|
||||
await req.jobQueue.addJob(editedMonitor._id, editedMonitor);
|
||||
return res.status(200).json({
|
||||
success: true,
|
||||
msg: successMessages.MONITOR_EDIT,
|
||||
|
||||
Reference in New Issue
Block a user