* WIP * WIP * Update trpc-router.ts * Fixes * Update trpc-router.ts * Update zod-utils.ts * Apply suggestions from code review Co-authored-by: Leo Giovanetti <hello@leog.me> * Feedback and dark mode fixes * Feedback * Fixes * Update UserForm.tsx --------- Co-authored-by: Leo Giovanetti <hello@leog.me>
13 lines
358 B
TypeScript
13 lines
358 B
TypeScript
import { z } from "zod";
|
|
|
|
import { optionToValueSchema } from "@calcom/prisma/zod-utils";
|
|
|
|
export const userBodySchema = z
|
|
.object({
|
|
locale: optionToValueSchema(z.string()),
|
|
role: optionToValueSchema(z.enum(["USER", "ADMIN"])),
|
|
weekStart: optionToValueSchema(z.string()),
|
|
timeFormat: optionToValueSchema(z.number()),
|
|
})
|
|
.passthrough();
|