chore: don't use ? for leaderboardService parameters
All checks were successful
Build / build (push) Successful in 41s
Build / build (pull_request) Successful in 1m26s

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.
This commit is contained in:
Sainan 2025-04-10 23:04:25 +02:00
parent 9f727789ca
commit f5dc61018a
2 changed files with 6 additions and 5 deletions

View File

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

View File

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