mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-22 21:39:36 +00:00
Fix discord login issue (#1028)
Fixes #1016 ## Description: Fix the zod user schema validation to make roles optional. This was causing a validation error when looking up the user's roles. ## 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 <662325+scottanderson@users.noreply.github.com>
This commit is contained in:
co-authored by
Scott Anderson
parent
0810d5d4f3
commit
a02037ae1c
@@ -42,7 +42,7 @@ export const UserMeResponseSchema = z.object({
|
||||
}),
|
||||
player: z.object({
|
||||
publicId: z.string(),
|
||||
roles: z.string().array(),
|
||||
roles: z.string().array().optional(),
|
||||
}),
|
||||
});
|
||||
export type UserMeResponse = z.infer<typeof UserMeResponseSchema>;
|
||||
|
||||
Reference in New Issue
Block a user