mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-19 17:58:24 -05:00
Normalize build filter value
Seems like for some reason I see error logs about lowercase at_least? Not sure why but it's not hard to deal with it
This commit is contained in:
parent
d3fcb5d769
commit
3e2f7f48d3
|
|
@ -4,7 +4,11 @@ import { ability, safeJSONParse } from "~/utils/zod";
|
|||
const buildFilterSchema = z.object({
|
||||
ability,
|
||||
value: z.union([z.number(), z.boolean()]),
|
||||
comparison: z.enum(["AT_LEAST", "AT_MOST"]).nullish(),
|
||||
comparison: z
|
||||
.string()
|
||||
.toUpperCase()
|
||||
.pipe(z.enum(["AT_LEAST", "AT_MOST"]))
|
||||
.nullish(),
|
||||
});
|
||||
|
||||
export const buildFiltersSearchParams = z.preprocess(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user