mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 12:22:22 +08:00
Merge pull request #68 from Saibamen/use_console_error
Improve printing to console
This commit is contained in:
@@ -15,7 +15,7 @@ class Notification {
|
||||
})
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class Notification {
|
||||
})
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class Notification {
|
||||
let res = await axios.post(notification.webhookURL, finalData, config)
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class Notification {
|
||||
let res = await axios.post(notification.discordWebhookUrl, data)
|
||||
return true;
|
||||
} catch(error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -121,10 +121,10 @@ class Notification {
|
||||
let res = await axios.post(notification.signalURL, data, config)
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
} else if (notification.type === "slack") {
|
||||
try {
|
||||
if (heartbeatJSON == null) {
|
||||
@@ -177,7 +177,7 @@ class Notification {
|
||||
let res = await axios.post(notification.slackwebhookURL, data)
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.error(error)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user