Skip to content

Commit 15cd1e9

Browse files
Fix discord user schema (#969)
## Description: Update the discord user zod schema to address login failures for users without avatars. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors Co-authored-by: Scott Anderson <[email protected]>
1 parent 5c750f1 commit 15cd1e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/ApiSchemas.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export type TokenPayload = z.infer<typeof TokenPayloadSchema>;
3434
export const UserMeResponseSchema = z.object({
3535
user: z.object({
3636
id: z.string(),
37-
avatar: z.string(),
37+
avatar: z.string().nullable(),
3838
username: z.string(),
39-
global_name: z.string(),
39+
global_name: z.string().nullable(),
4040
discriminator: z.string(),
41-
locale: z.string(),
41+
locale: z.string().optional(),
4242
}),
4343
player: z.object({
4444
publicId: z.string(),

0 commit comments

Comments
 (0)