From 2ebd79d0373c0c55728b7729a7f81b4750deb84c Mon Sep 17 00:00:00 2001
From: LouisLam
Date: Sat, 31 Jul 2021 13:35:18 +0800
Subject: [PATCH] run eslint for lunasea change
---
server/notification.js | 16 ++++++++--------
src/components/NotificationDialog.vue | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/server/notification.js b/server/notification.js
index ffa6541c..0e963a12 100644
--- a/server/notification.js
+++ b/server/notification.js
@@ -236,13 +236,13 @@ class Notification {
return Notification.apprise(notification, msg)
} else if (notification.type === "lunasea") {
- let lunaseadevice = "https://notify.lunasea.app/v1/custom/device/"+notification.lunaseaDevice
+ let lunaseadevice = "https://notify.lunasea.app/v1/custom/device/" + notification.lunaseaDevice
try {
if (heartbeatJSON == null) {
let testdata = {
"title": "Uptime Kuma Alert",
- "body": "Testing Successful."
+ "body": "Testing Successful.",
}
await axios.post(lunaseadevice, testdata)
return okMsg;
@@ -250,8 +250,8 @@ class Notification {
if (heartbeatJSON["status"] == 0) {
let downdata = {
- "title": "UptimeKuma Alert:" +monitorJSON["name"],
- "body": "[🔴 Down]"+heartbeatJSON["msg"]+ "\nTime (UTC):" + heartbeatJSON["time"]
+ "title": "UptimeKuma Alert:" + monitorJSON["name"],
+ "body": "[🔴 Down]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
}
await axios.post(lunaseadevice, downdata)
return okMsg;
@@ -259,14 +259,14 @@ class Notification {
if (heartbeatJSON["status"] == 1) {
let updata = {
- "title": "UptimeKuma Alert:" +monitorJSON["name"],
- "body": "[✅ Up]"+heartbeatJSON["msg"]+ "\nTime (UTC):" + heartbeatJSON["time"]
+ "title": "UptimeKuma Alert:" + monitorJSON["name"],
+ "body": "[✅ Up]" + heartbeatJSON["msg"] + "\nTime (UTC):" + heartbeatJSON["time"],
}
await axios.post(lunaseadevice, updata)
return okMsg;
}
-
- } catch (error) {
+
+ } catch (error) {
throwGeneralAxiosError(error)
}
diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue
index 15c2bb70..9e8b7c10 100644
--- a/src/components/NotificationDialog.vue
+++ b/src/components/NotificationDialog.vue
@@ -323,7 +323,7 @@
-
+
@@ -333,7 +333,7 @@
-
+