mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-24 05:46:39 +00:00
various small fixes
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user