Add missing string getter
This commit is contained in:
1 parent
ea64316c55
commit
395cc5db77
3 files changed
+17
-11
No files matched your search
@@ -582,16 +582,18 @@ class MonitorController {
|
||||
}
|
||||
|
||||
try {
|
||||
const monitor = await Monitor.findOneAndUpdate({ _id: req.params.monitorId }, [
|
||||
{
|
||||
$set: {
|
||||
isActive: { $not: "$isActive" },
|
||||
status: "$$REMOVE",
|
||||
const monitor = await Monitor.findOneAndUpdate(
|
||||
{ _id: req.params.monitorId },
|
||||
[
|
||||
{
|
||||
$set: {
|
||||
isActive: { $not: "$isActive" },
|
||||
status: "$$REMOVE",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
{ new: true }
|
||||
);
|
||||
],
|
||||
{ new: true }
|
||||
);
|
||||
monitor.isActive === true
|
||||
? await this.jobQueue.deleteJob(monitor)
|
||||
: await this.jobQueue.addJob(monitor._id, monitor);
|
||||
|
||||
Reference in new issue
Block a user