Change Pushdeer to PushDeer

pull/1007/head
Louis Lam 2 years ago
parent 93c51504f9
commit fb0064082e

@ -2,9 +2,9 @@ const NotificationProvider = require("./notification-provider");
const axios = require("axios");
const { DOWN, UP } = require("../../src/util");
class Pushdeer extends NotificationProvider {
class PushDeer extends NotificationProvider {
name = "Pushdeer";
name = "PushDeer";
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
let okMsg = "Sent Successfully.";
@ -36,7 +36,7 @@ class Pushdeer extends NotificationProvider {
this.throwGeneralAxiosError(error);
}
if (res.data.content.result.length === 0) {
let error = "Invalid Pushdeer key";
let error = "Invalid PushDeer key";
this.throwGeneralAxiosError(error);
} else if (JSON.parse(res.data.content.result[0]).success != "ok") {
let error = "Unknown error";
@ -49,4 +49,4 @@ class Pushdeer extends NotificationProvider {
}
}
module.exports = Pushdeer;
module.exports = PushDeer;

@ -32,7 +32,7 @@ const GoogleChat = require("./notification-providers/google-chat");
const Gorush = require("./notification-providers/gorush");
const Alerta = require("./notification-providers/alerta");
const OneBot = require("./notification-providers/onebot");
const Pushdeer = require("./notification-providers/pushdeer");
const PushDeer = require("./notification-providers/pushdeer");
class Notification {
@ -76,7 +76,7 @@ class Notification {
new Gorush(),
new Alerta(),
new OneBot(),
new Pushdeer(),
new PushDeer(),
];
for (let item of list) {

@ -1,6 +1,6 @@
<template>
<div class="mb-3">
<label for="pushdeer-key" class="form-label">{{ $t("Pushdeer Key") }}</label>
<label for="pushdeer-key" class="form-label">{{ $t("PushDeer Key") }}</label>
<HiddenInput id="pushdeer-key" v-model="$parent.notification.pushdeerKey" :required="true" autocomplete="one-time-code" placeholder="PDUxxxx"></HiddenInput>
</div>

@ -30,7 +30,7 @@ import GoogleChat from "./GoogleChat.vue";
import Gorush from "./Gorush.vue";
import Alerta from "./Alerta.vue";
import OneBot from "./OneBot.vue";
import Pushdeer from "./Pushdeer.vue";
import PushDeer from "./PushDeer.vue";
/**
* Manage all notification form.
@ -70,7 +70,7 @@ const NotificationFormList = {
"gorush": Gorush,
"alerta": Alerta,
"OneBot": OneBot,
"Pushdeer": Pushdeer,
"PushDeer": PushDeer,
};
export default NotificationFormList;

@ -451,5 +451,5 @@ export default {
onebotPrivateMessage: "Private",
onebotUserOrGroupId: "Group/User ID",
onebotSafetyTips: "For safety, must set access token",
"Pushdeer Key": "Pushdeer Key",
"PushDeer Key": "PushDeer Key",
};

Loading…
Cancel
Save