mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-22 00:53:09 +08:00
refactor(notification-providers): improve code for pushplus
This commit is contained in:
@@ -7,11 +7,15 @@ class PushPlus extends NotificationProvider {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
|
* @param {BeanModel} notification Notification object
|
||||||
|
* @param {string} msg Message content
|
||||||
|
* @param {?object} monitorJSON Monitor details
|
||||||
|
* @param {?object} heartbeatJSON Heartbeat details
|
||||||
|
* @returns {Promise<string>} Success message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
const okMsg = "Sent Successfully.";
|
const okMsg = "Sent Successfully.";
|
||||||
const url = `https://www.pushplus.plus/send`;
|
const url = "https://www.pushplus.plus/send";
|
||||||
try {
|
try {
|
||||||
await axios.post(url, {
|
await axios.post(url, {
|
||||||
"token": notification.pushPlusSendKey,
|
"token": notification.pushPlusSendKey,
|
||||||
|
Reference in New Issue
Block a user