sendou.ink/utils/validators/votes.ts
2021-03-20 16:16:59 +02:00

9 lines
181 B
TypeScript

import * as z from "zod";
export const voteSchema = z.object({
score: z.number().min(-2).max(2).int(),
userId: z.number(),
});
export const votesSchema = z.array(voteSchema);