From e8c650797c80fe7189091afa9a81d4bad679dac1 Mon Sep 17 00:00:00 2001 From: Tanmay Shinde <62463484+tanmay4u02@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:17:00 +0530 Subject: [PATCH] refactor: removed unnecessary todo comment, modified jsdoc of utility func (#5164) --- server/notification-providers/dingding.js | 1 - src/util.js | 2 +- src/util.ts | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/notification-providers/dingding.js b/server/notification-providers/dingding.js index 5d8cb894..c66f270a 100644 --- a/server/notification-providers/dingding.js +++ b/server/notification-providers/dingding.js @@ -87,7 +87,6 @@ class DingDing extends NotificationProvider { * @returns {string} Status */ statusToString(status) { - // TODO: Move to notification-provider.js to avoid repetition in classes switch (status) { case DOWN: return "DOWN"; diff --git a/src/util.js b/src/util.js index b1da3492..df89cf92 100644 --- a/src/util.js +++ b/src/util.js @@ -458,4 +458,4 @@ async function evaluateJsonQuery(data, jsonPath, jsonPathOperator, expectedValue throw new Error(`Error evaluating JSON query: ${err.message}. Response from server was: ${response}`); } } -exports.evaluateJsonQuery = evaluateJsonQuery; +exports.evaluateJsonQuery = evaluateJsonQuery; \ No newline at end of file diff --git a/src/util.ts b/src/util.ts index efc8f3a8..b3bab4ff 100644 --- a/src/util.ts +++ b/src/util.ts @@ -120,7 +120,11 @@ export const badgeConstants = { defaultCertExpireDownDays: "7" }; -/** Flip the status of s */ +/** + * Flip the status of s between UP and DOWN if this is possible + * @param s {number} status + * @returns {number} flipped status + */ export function flipStatus(s: number) { if (s === UP) { return DOWN;