mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-20 21:58:16 +08:00
Revert "feat: structured logging (JSON)" (#5175)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
const NotificationProvider = require("./notification-provider");
|
||||
const axios = require("axios");
|
||||
const { setSettings, setting } = require("../util-server");
|
||||
const { getMonitorRelativeURL, UP } = require("../../src/util");
|
||||
const { Settings } = require("../settings");
|
||||
const { log } = require("../../src/util");
|
||||
|
||||
class Slack extends NotificationProvider {
|
||||
name = "slack";
|
||||
@@ -15,13 +14,15 @@ class Slack extends NotificationProvider {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
static async deprecateURL(url) {
|
||||
let currentPrimaryBaseURL = await Settings.get("primaryBaseURL");
|
||||
let currentPrimaryBaseURL = await setting("primaryBaseURL");
|
||||
|
||||
if (!currentPrimaryBaseURL) {
|
||||
log.error("notification", "Move the url to be the primary base URL");
|
||||
await Settings.set("primaryBaseURL", url, "general");
|
||||
console.log("Move the url to be the primary base URL");
|
||||
await setSettings("general", {
|
||||
primaryBaseURL: url,
|
||||
});
|
||||
} else {
|
||||
log.debug("notification", "Already there, no need to move the primary base URL");
|
||||
console.log("Already there, no need to move the primary base URL");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +136,7 @@ class Slack extends NotificationProvider {
|
||||
return okMsg;
|
||||
}
|
||||
|
||||
const baseURL = await Settings.get("primaryBaseURL");
|
||||
const baseURL = await setting("primaryBaseURL");
|
||||
|
||||
const title = "Uptime Kuma Alert";
|
||||
let data = {
|
||||
|
Reference in New Issue
Block a user