Skip to content

Commit

Permalink
Fix minor typo in suspect verification
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Oct 27, 2024
1 parent f6661b4 commit 41dfa29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const redundantFetch = async (targetUrl: string, data: RequestInit, attempts = 0
}
};

const smogonFetch = async (targetUrl: string, method: string, data: {[k: string]: any}) => {
export const smogonFetch = async (targetUrl: string, method: string, data: {[k: string]: any}) => {
const bodyText = JSON.stringify(data);
const hash = await signAsync("RSA-SHA1", bodyText, Config.privatekey);
return redundantFetch(`https://www.smogon.com/${targetUrl}`, {
Expand All @@ -80,7 +80,7 @@ const smogonFetch = async (targetUrl: string, method: string, data: {[k: string]
});
};

function checkSuspectVerified(
export function checkSuspectVerified(
rating: LadderEntry,
suspect: {formatid: string, start_date: number},
reqs: Record<string, number | null>
Expand Down Expand Up @@ -110,7 +110,7 @@ function checkSuspectVerified(
}
if (
// sanity check for reqs existing just to be totally safe
(reqsMet >= 1 && reqsMet === reqCount) &&
(reqsMet > 0 && reqsMet === reqCount) &&
// did not play games before the test began
(rating?.first_played && rating.first_played > suspect.start_date)
) {
Expand Down

0 comments on commit 41dfa29

Please sign in to comment.