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,
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;