mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-30 03:00:40 +00:00
remove double spaces
This commit is contained in:
parent
99e8a33118
commit
34b86352f2
16 changed files with 16 additions and 16 deletions
|
@ -7,7 +7,7 @@ class Discord extends NotificationProvider {
|
||||||
name = "discord";
|
name = "discord";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const discordDisplayName = notification.discordUsername || "Uptime Kuma";
|
const discordDisplayName = notification.discordUsername || "Uptime Kuma";
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Gotify extends NotificationProvider {
|
||||||
name = "gotify";
|
name = "gotify";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
try {
|
try {
|
||||||
if (notification.gotifyserverurl && notification.gotifyserverurl.endsWith("/")) {
|
if (notification.gotifyserverurl && notification.gotifyserverurl.endsWith("/")) {
|
||||||
notification.gotifyserverurl = notification.gotifyserverurl.slice(0, -1);
|
notification.gotifyserverurl = notification.gotifyserverurl.slice(0, -1);
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Line extends NotificationProvider {
|
||||||
name = "line";
|
name = "line";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
try {
|
try {
|
||||||
let lineAPIUrl = "https://api.line.me/v2/bot/message/push";
|
let lineAPIUrl = "https://api.line.me/v2/bot/message/push";
|
||||||
let config = {
|
let config = {
|
||||||
|
|
|
@ -7,7 +7,7 @@ class LunaSea extends NotificationProvider {
|
||||||
name = "lunasea";
|
name = "lunasea";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
let lunaseadevice = "https://notify.lunasea.app/v1/custom/device/" + notification.lunaseaDevice
|
let lunaseadevice = "https://notify.lunasea.app/v1/custom/device/" + notification.lunaseaDevice
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Matrix extends NotificationProvider {
|
||||||
name = "matrix";
|
name = "matrix";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
const size = 20;
|
const size = 20;
|
||||||
const randomString = Crypto
|
const randomString = Crypto
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Mattermost extends NotificationProvider {
|
||||||
name = "mattermost";
|
name = "mattermost";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
try {
|
try {
|
||||||
const mattermostUserName = notification.mattermostusername || "Uptime Kuma";
|
const mattermostUserName = notification.mattermostusername || "Uptime Kuma";
|
||||||
// If heartbeatJSON is null, assume we're testing.
|
// If heartbeatJSON is null, assume we're testing.
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Octopush extends NotificationProvider {
|
||||||
name = "octopush";
|
name = "octopush";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let config = {
|
let config = {
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Pushbullet extends NotificationProvider {
|
||||||
name = "pushbullet";
|
name = "pushbullet";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let pushbulletUrl = "https://api.pushbullet.com/v2/pushes";
|
let pushbulletUrl = "https://api.pushbullet.com/v2/pushes";
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Pushover extends NotificationProvider {
|
||||||
name = "pushover";
|
name = "pushover";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
let pushoverlink = "https://api.pushover.net/1/messages.json"
|
let pushoverlink = "https://api.pushover.net/1/messages.json"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Pushy extends NotificationProvider {
|
||||||
name = "pushy";
|
name = "pushy";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await axios.post(`https://api.pushy.me/push?api_key=${notification.pushyAPIKey}`, {
|
await axios.post(`https://api.pushy.me/push?api_key=${notification.pushyAPIKey}`, {
|
||||||
|
|
|
@ -6,7 +6,7 @@ class RocketChat extends NotificationProvider {
|
||||||
name = "rocket.chat";
|
name = "rocket.chat";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
try {
|
try {
|
||||||
if (heartbeatJSON == null) {
|
if (heartbeatJSON == null) {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Signal extends NotificationProvider {
|
||||||
name = "signal";
|
name = "signal";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Slack extends NotificationProvider {
|
||||||
name = "slack";
|
name = "slack";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
try {
|
try {
|
||||||
if (heartbeatJSON == null) {
|
if (heartbeatJSON == null) {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
|
@ -87,7 +87,7 @@ class Teams extends NotificationProvider {
|
||||||
};
|
};
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (heartbeatJSON == null) {
|
if (heartbeatJSON == null) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ class Telegram extends NotificationProvider {
|
||||||
name = "telegram";
|
name = "telegram";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await axios.get(`https://api.telegram.org/bot${notification.telegramBotToken}/sendMessage`, {
|
await axios.get(`https://api.telegram.org/bot${notification.telegramBotToken}/sendMessage`, {
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Webhook extends NotificationProvider {
|
||||||
name = "webhook";
|
name = "webhook";
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
let okMsg = "Sent Successfully. ";
|
let okMsg = "Sent Successfully.";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
Loading…
Reference in a new issue