Change Pushdeer to PushDeer

This commit is contained in:
Louis Lam 2022-04-14 14:29:54 +08:00
parent 93c51504f9
commit fb0064082e
5 changed files with 10 additions and 10 deletions

View file

@ -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;

View file

@ -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) {

View file

@ -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>

View file

@ -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;

View file

@ -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",
};