various small fixes

This commit is contained in:
miloschwartz 2025-04-29 22:59:38 -04:00
parent 3ebc01df8c
commit 237960fc5b
No known key found for this signature in database
11 changed files with 122 additions and 43 deletions

View file

@ -19,7 +19,15 @@ const paramsSchema = z
const bodySchema = z
.object({
email: z.string().email().optional(),
email: z
.string()
.optional()
.refine((data) => {
if (data) {
return z.string().email().safeParse(data).success;
}
return true;
}),
username: z.string().nonempty(),
name: z.string().optional(),
type: z.enum(["internal", "oidc"]).optional(),