mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-02 01:25:24 -05:00
notificationIDList not display properly
revert to original insted of map
This commit is contained in:
parent
39f3e6311d
commit
416ba88f6b
@ -79,8 +79,7 @@ class Monitor extends BeanModel {
|
|||||||
toJSON(preloadData = {}, includeSensitiveData = true) {
|
toJSON(preloadData = {}, includeSensitiveData = true) {
|
||||||
|
|
||||||
const tags = preloadData.tags.get(this.id) || [];
|
const tags = preloadData.tags.get(this.id) || [];
|
||||||
const notificationIDList = preloadData.notifications.get(this.id) || new Map();
|
const notificationIDList = preloadData.notifications.get(this.id) || {};
|
||||||
|
|
||||||
let screenshot = null;
|
let screenshot = null;
|
||||||
|
|
||||||
if (this.type === "real-browser") {
|
if (this.type === "real-browser") {
|
||||||
@ -1560,9 +1559,9 @@ class Monitor extends BeanModel {
|
|||||||
|
|
||||||
notifications.forEach(row => {
|
notifications.forEach(row => {
|
||||||
if (!notificationsMap.has(row.monitor_id)) {
|
if (!notificationsMap.has(row.monitor_id)) {
|
||||||
notificationsMap.set(row.monitor_id, new Map());
|
notificationsMap.set(row.monitor_id, {});
|
||||||
}
|
}
|
||||||
notificationsMap.get(row.monitor_id).set(row.notification_id, true);
|
notificationsMap.get(row.monitor_id)[row.notification_id] = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
tags.forEach(row => {
|
tags.forEach(row => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user