add monitor an dprevStatus to response from statusService if monitor status does not change
This commit is contained in:
1 parent
b96648b155
commit
355f7e0511
1 file changed
+2
-1
@@ -29,7 +29,8 @@ class StatusService {
|
||||
const { monitorId, status } = networkResponse;
|
||||
const monitor = await this.db.getMonitorById(monitorId);
|
||||
// No change in monitor status, return early
|
||||
if (monitor.status === status) return { statusChanged: false };
|
||||
if (monitor.status === status)
|
||||
return { monitor, statusChanged: false, prevStatus: monitor.status };
|
||||
// Monitor status changed, save prev status and update monitor
|
||||
|
||||
this.logger.info({
|
||||
|
||||
Reference in new issue
Block a user