mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 11:17:43 +08:00
Added JSDoc to ESLint (#3529)
* Added JSDoc to eslint rules Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com> * Fixed JSDoc eslint errors Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com> * Update the check-linters workflow to Node.js 20 --------- Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com> Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
This commit is contained in:
@@ -10,7 +10,7 @@ class ZohoCliq extends NotificationProvider {
|
||||
* Generate the message to send
|
||||
* @param {const} status The status constant
|
||||
* @param {string} monitorName Name of monitor
|
||||
* @returns {string}
|
||||
* @returns {string} Status message
|
||||
*/
|
||||
_statusMessageFactory = (status, monitorName) => {
|
||||
if (status === DOWN) {
|
||||
@@ -25,6 +25,7 @@ class ZohoCliq extends NotificationProvider {
|
||||
* Send the notification
|
||||
* @param {string} webhookUrl URL to send the request to
|
||||
* @param {Array} payload Payload generated by _notificationPayloadFactory
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
_sendNotification = async (webhookUrl, payload) => {
|
||||
await axios.post(webhookUrl, { text: payload.join("\n") });
|
||||
@@ -32,11 +33,12 @@ class ZohoCliq extends NotificationProvider {
|
||||
|
||||
/**
|
||||
* Generate payload for notification
|
||||
* @param {const} status The status of the monitor
|
||||
* @param {string} monitorMessage Message to send
|
||||
* @param {string} monitorName Name of monitor affected
|
||||
* @param {string} monitorUrl URL of monitor affected
|
||||
* @returns {Array}
|
||||
* @param {object} args Method arguments
|
||||
* @param {const} args.status The status of the monitor
|
||||
* @param {string} args.monitorMessage Message to send
|
||||
* @param {string} args.monitorName Name of monitor affected
|
||||
* @param {string} args.monitorUrl URL of monitor affected
|
||||
* @returns {Array} Notification payload
|
||||
*/
|
||||
_notificationPayloadFactory = ({
|
||||
status,
|
||||
@@ -74,6 +76,9 @@ class ZohoCliq extends NotificationProvider {
|
||||
return this._sendNotification(webhookUrl, payload);
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||
let okMsg = "Sent Successfully.";
|
||||
|
||||
|
Reference in New Issue
Block a user