mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-12 09:01:57 -06:00
zoho cliq code style
This commit is contained in:
parent
851a04b082
commit
9da28fbbc7
@ -26,8 +26,8 @@ class ZohoCliq extends NotificationProvider {
|
|||||||
* @param {string} webhookUrl URL to send the request to
|
* @param {string} webhookUrl URL to send the request to
|
||||||
* @param {Array} payload Payload generated by _notificationPayloadFactory
|
* @param {Array} payload Payload generated by _notificationPayloadFactory
|
||||||
*/
|
*/
|
||||||
_sendNotification = async(webhookUrl, payload) => {
|
_sendNotification = async (webhookUrl, payload) => {
|
||||||
await axios.post(webhookUrl, {text: payload.join("\n")});
|
await axios.post(webhookUrl, { text: payload.join("\n") });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,10 +39,10 @@ class ZohoCliq extends NotificationProvider {
|
|||||||
* @returns {Array}
|
* @returns {Array}
|
||||||
*/
|
*/
|
||||||
_notificationPayloadFactory = ({
|
_notificationPayloadFactory = ({
|
||||||
status,
|
status,
|
||||||
monitorMessage,
|
monitorMessage,
|
||||||
monitorName,
|
monitorName,
|
||||||
monitorUrl,
|
monitorUrl,
|
||||||
}) => {
|
}) => {
|
||||||
const payload = [];
|
const payload = [];
|
||||||
payload.push("### Uptime Kuma\n");
|
payload.push("### Uptime Kuma\n");
|
||||||
@ -107,7 +107,7 @@ class ZohoCliq extends NotificationProvider {
|
|||||||
await this._sendNotification(notification.webhookUrl, payload);
|
await this._sendNotification(notification.webhookUrl, payload);
|
||||||
return okMsg;
|
return okMsg;
|
||||||
|
|
||||||
} catch(error) {
|
} catch (error) {
|
||||||
this.throwGeneralAxiosError(error);
|
this.throwGeneralAxiosError(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user