From 5caa3e1e33b8a0e68e0a7fff08ce3c89b0182a8d Mon Sep 17 00:00:00 2001 From: Mara Date: Wed, 24 Jan 2024 14:18:26 +0100 Subject: [PATCH] Refactor rate limit API verification logic --- src/utils/data_validation_test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/data_validation_test.ts b/src/utils/data_validation_test.ts index fc50c217..7d7d0329 100644 --- a/src/utils/data_validation_test.ts +++ b/src/utils/data_validation_test.ts @@ -391,13 +391,13 @@ export async function verifyRateLimitAPI(octokit: Octokit, settings: GitHubPubli new Notice(i18next.t("commands.checkValidity.rateLimit.limited", {resetTime: time})); return 0; } - if (!commands) { - notif({settings}, i18next.t("commands.checkValidity.rateLimit.notLimited", { - remaining: remaining, + if (commands) { + new Notice(i18next.t("commands.checkValidity.rateLimit.notLimited", { + remaining, resetTime: time })); } else { - new Notice(i18next.t("commands.checkValidity.rateLimit.notLimited", { + notif({settings}, i18next.t("commands.checkValidity.rateLimit.notLimited", { remaining, resetTime: time }));