From 6875ecdfbfe528fc6841bf731024bb84f838f653 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Mon, 2 Oct 2023 21:39:17 +0000 Subject: [PATCH] Fix warnings (#3826) --- server/model/monitor.js | 4 ++-- server/routers/api-router.js | 2 -- server/routers/status-page-router.js | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 284a5ccc9..216283e16 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -2,7 +2,7 @@ const https = require("https"); const dayjs = require("dayjs"); const axios = require("axios"); const { Prometheus } = require("../prometheus"); -const { log, UP, DOWN, PENDING, MAINTENANCE, flipStatus, TimeLogger, MAX_INTERVAL_SECOND, MIN_INTERVAL_SECOND, +const { log, UP, DOWN, PENDING, MAINTENANCE, flipStatus, MAX_INTERVAL_SECOND, MIN_INTERVAL_SECOND, SQL_DATETIME_FORMAT } = require("../../src/util"); const { tcping, ping, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, mssqlQuery, postgresQuery, mysqlQuery, mqttAsync, setSetting, httpNtlm, radius, grpcQuery, @@ -1067,7 +1067,7 @@ class Monitor extends BeanModel { /** * Example: http: or https: - * @returns {(null|string)} + * @returns {(null|string)} URL's protocol */ getURLProtocol() { const url = this.getUrl(); diff --git a/server/routers/api-router.js b/server/routers/api-router.js index d480ed6ed..d1445d30c 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -283,8 +283,6 @@ router.get("/api/badge/:id/ping/:duration?", cache("5 minutes"), async (request, requestedDuration = "24h"; } - const sqlHourOffset = Database.sqlHourOffset(); - // Check if monitor is public const uptimeCalculator = await UptimeCalculator.getUptimeCalculator(requestedMonitorId); diff --git a/server/routers/status-page-router.js b/server/routers/status-page-router.js index f8c347050..86d2af9a9 100644 --- a/server/routers/status-page-router.js +++ b/server/routers/status-page-router.js @@ -4,7 +4,6 @@ const { UptimeKumaServer } = require("../uptime-kuma-server"); const StatusPage = require("../model/status_page"); const { allowDevAllOrigin, sendHttpError } = require("../util-server"); const { R } = require("redbean-node"); -const Monitor = require("../model/monitor"); const { badgeConstants } = require("../config"); const { makeBadge } = require("badge-maker"); const { UptimeCalculator } = require("../uptime-calculator");