Skip to content

Commit

Permalink
refactor: removed unnecessary todo comment, modified jsdoc of utility…
Browse files Browse the repository at this point in the history
… func (#5164)
  • Loading branch information
tanmay4u02 authored Oct 9, 2024
1 parent eca90a2 commit e8c6507
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion server/notification-providers/dingding.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
6 changes: 5 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e8c6507

Please sign in to comment.