chore: don't use ? for leaderboardService parameters (#1551)
Some checks failed
Build Docker image / docker (push) Has been cancelled
Build / build (push) Has been cancelled

This means the argument can be omitted when we really mean that it can be undefined — but we still want it to be explicitly given.

Reviewed-on: #1551
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-04-11 06:54:47 -07:00 committed by Sainan
parent ec8982a921
commit 5149d0e382
2 changed files with 6 additions and 5 deletions

View File

@ -8,7 +8,7 @@ export const submitLeaderboardScore = async (
ownerId: string,
displayName: string,
score: number,
guildId?: string
guildId: string | undefined
): Promise<void> => {
let expiry: Date;
if (schedule == "daily") {
@ -39,9 +39,9 @@ export const getLeaderboard = async (
leaderboard: string,
before: number,
after: number,
pivotId?: string,
guildId?: string,
guildTier?: number
pivotId: string | undefined,
guildId: string | undefined,
guildTier: number | undefined
): Promise<ILeaderboardEntryClient[]> => {
const filter: { leaderboard: string; guildId?: string; guildTier?: number } = { leaderboard };
if (guildId) {

View File

@ -378,7 +378,8 @@ export const updateStats = async (accountOwnerId: string, payload: IStatsUpdate)
category,
accountOwnerId,
payload.displayName,
data as number
data as number,
payload.guildId
);
break;