diff --git a/server/notification-providers/techulus-push.js b/server/notification-providers/techulus-push.js new file mode 100644 index 00000000..f844d17c --- /dev/null +++ b/server/notification-providers/techulus-push.js @@ -0,0 +1,23 @@ +const NotificationProvider = require("./notification-provider"); +const axios = require("axios"); + +class TechulusPush extends NotificationProvider { + + name = "PushByTechulus"; + + async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { + let okMsg = "Sent Successfully."; + + try { + await axios.post(`https://push.techulus.com/api/v1/notify/${notification.pushAPIKey}`, { + "title": "Uptime-Kuma", + "body": msg, + }) + return okMsg; + } catch (error) { + this.throwGeneralAxiosError(error) + } + } +} + +module.exports = TechulusPush; diff --git a/server/notification.js b/server/notification.js index 3b12fbcd..30f83b0e 100644 --- a/server/notification.js +++ b/server/notification.js @@ -12,6 +12,7 @@ const ClickSendSMS = require("./notification-providers/clicksendsms"); const Pushbullet = require("./notification-providers/pushbullet"); const Pushover = require("./notification-providers/pushover"); const Pushy = require("./notification-providers/pushy"); +const TechulusPush = require("./notification-providers/techulus-push"); const RocketChat = require("./notification-providers/rocket-chat"); const Signal = require("./notification-providers/signal"); const Slack = require("./notification-providers/slack"); @@ -57,6 +58,7 @@ class Notification { new Pushbullet(), new Pushover(), new Pushy(), + new TechulusPush(), new RocketChat(), new Signal(), new Slack(), diff --git a/src/components/notifications/TechulusPush.vue b/src/components/notifications/TechulusPush.vue new file mode 100644 index 00000000..918f8be6 --- /dev/null +++ b/src/components/notifications/TechulusPush.vue @@ -0,0 +1,20 @@ + + + diff --git a/src/components/notifications/index.js b/src/components/notifications/index.js index 9b6768cf..8d14e7f2 100644 --- a/src/components/notifications/index.js +++ b/src/components/notifications/index.js @@ -9,6 +9,7 @@ import RocketChat from "./RocketChat.vue"; import Teams from "./Teams.vue"; import Pushover from "./Pushover.vue"; import Pushy from "./Pushy.vue"; +import TechulusPush from "./TechulusPush.vue"; import Octopush from "./Octopush.vue"; import PromoSMS from "./PromoSMS.vue"; import ClickSendSMS from "./ClickSendSMS.vue"; @@ -46,6 +47,7 @@ const NotificationFormList = { "rocket.chat": RocketChat, "pushover": Pushover, "pushy": Pushy, + "PushByTechulus": TechulusPush, "octopush": Octopush, "promosms": PromoSMS, "clicksendsms": ClickSendSMS, diff --git a/src/languages/en.js b/src/languages/en.js index 9ab89717..40c9c89f 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -238,6 +238,7 @@ export default { "rocket.chat": "Rocket.Chat", pushover: "Pushover", pushy: "Pushy", + PushByTechulus: "Push by Techulus", octopush: "Octopush", promosms: "PromoSMS", clicksendsms: "ClickSend SMS",