Added missing await

This commit is contained in:
Alex Holliday committed 2024-07-03 23:19:12 -07:00
1 parent 5d24f3136c
commit fc6691e148
1 file changed
+2 -2
+2 -2
View File
@@ -215,9 +215,9 @@ const editMonitor = async (req, res, next) => {
try { try {
const editedMonitor = await req.db.editMonitor(req, res); const editedMonitor = await req.db.editMonitor(req, res);
// Delete the old job(editedMonitor has the same ID as the old monitor) // 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 // 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({ return res.status(200).json({
success: true, success: true,
msg: successMessages.MONITOR_EDIT, msg: successMessages.MONITOR_EDIT,