dt-common-device 13.0.13 → 13.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -603,14 +603,14 @@ let AlertService = (() => {
|
|
|
603
603
|
const alerts = await this.queryAlerts(query);
|
|
604
604
|
if (!alerts.length)
|
|
605
605
|
return null;
|
|
606
|
-
|
|
607
|
-
|
|
606
|
+
for (const alert of alerts) {
|
|
607
|
+
const alertModel = await Alert_model_1.AlertModel.findById(alert._id || alert.id);
|
|
608
|
+
if (!alertModel)
|
|
609
|
+
return null;
|
|
610
|
+
alertModel.deactivate(updatedBy);
|
|
611
|
+
await alertModel.save();
|
|
608
612
|
}
|
|
609
|
-
|
|
610
|
-
if (!alert)
|
|
611
|
-
return null;
|
|
612
|
-
alert.deactivate(updatedBy);
|
|
613
|
-
return await alert.save();
|
|
613
|
+
return null;
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
616
616
|
* Snooze an alert with business logic
|