From 86492f6dad299dd6a22562e0c45d41346e7d2770 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Sat, 10 Jul 2021 12:04:40 +0800 Subject: [PATCH] remove some debug msg --- server/model/monitor.js | 5 ++--- server/notification.js | 1 - src/pages/Settings.vue | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index ef6c519e4..269d9da2f 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -66,7 +66,6 @@ class Monitor extends BeanModel { bean.duration = dayjs(bean.time).diff(dayjs(previousBeat.time), 'second'); } else { bean.duration = 0; - console.log(previousBeat) } try { @@ -167,7 +166,7 @@ class Monitor extends BeanModel { let avgPing = parseInt(await R.getCell(` SELECT AVG(ping) FROM heartbeat - WHERE time > DATE('now', ? || ' hours') + WHERE time > DATETIME('now', ? || ' hours') AND ping IS NOT NULL AND monitor_id = ? `, [ -duration, @@ -189,7 +188,7 @@ class Monitor extends BeanModel { let downtimeList = await R.getAll(` SELECT duration, time, status FROM heartbeat - WHERE time > DATE('now', ? || ' hours') + WHERE time > DATETIME('now', ? || ' hours') AND monitor_id = ? `, [ -duration, monitorID diff --git a/server/notification.js b/server/notification.js index 14a975884..f8dc67977 100644 --- a/server/notification.js +++ b/server/notification.js @@ -124,7 +124,6 @@ class Notification { const client = new Discord.Client(); await client.login(notification.discordToken) - console.log(notification.discordChannelID) const channel = await client.channels.fetch(notification.discordChannelID); await channel.send(msg); diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 0ca613d22..5c38de915 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -54,9 +54,9 @@

Notifications

Not available, please setup.

-