Skip to content

Commit e8c0fc0

Browse files
committed
chore: temporairly allow null discordIds
1 parent f0f27f0 commit e8c0fc0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/contracts/src/schemas/leaderboards.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ export const RedisXpLeaderboardEntrySchema = z.object({
3232
lastActivityTimestamp: z.number().int().nonnegative(),
3333
timeTypedSeconds: z.number().nonnegative(),
3434
// optionals
35-
discordId: z.string().optional(),
35+
// discordId: z.string().optional(),
36+
discordId: z //todo remove once weekly leaderboards reset twice and remove null values
37+
.string()
38+
.optional()
39+
.or(z.null().transform((_val) => undefined)),
3640
discordAvatar: z.string().optional(),
3741
badgeId: z.number().int().optional(),
3842
isPremium: z.boolean().optional(),

0 commit comments

Comments
 (0)