mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 07:16:17 +08:00
fix(server): get personal bests request mode2 should be optional
!nuf
This commit is contained in:
parent
715bc0ec23
commit
d5fb24fb12
|
@ -2407,10 +2407,7 @@ describe("user controller test", () => {
|
|||
//THEN
|
||||
expect(body).toEqual({
|
||||
message: "Invalid query schema",
|
||||
validationErrors: [
|
||||
'"mode" Required',
|
||||
'"mode2" Needs to be either a number, "zen" or "custom".',
|
||||
],
|
||||
validationErrors: ['"mode" Required'],
|
||||
});
|
||||
});
|
||||
it("should fail with unknown query parameters", async () => {
|
||||
|
|
|
@ -89,7 +89,7 @@ export type UpdatePasswordRequest = z.infer<typeof UpdatePasswordRequestSchema>;
|
|||
|
||||
export const GetPersonalBestsQuerySchema = z.object({
|
||||
mode: ModeSchema,
|
||||
mode2: Mode2Schema,
|
||||
mode2: Mode2Schema.optional(),
|
||||
});
|
||||
export type GetPersonalBestsQuery = z.infer<typeof GetPersonalBestsQuerySchema>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue