mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 21:57:16 +01:00
fix zod validations and prisma query for admin teams
This commit is contained in:
parent
df3ae72ab7
commit
9fb38f6970
3 changed files with 19 additions and 15 deletions
|
|
@ -26,9 +26,9 @@ export async function GET(request: Request, { params }: { params: Promise<{ user
|
|||
|
||||
export async function POST(request: Request, { params }: { params: Promise<{ userId: string }> }) {
|
||||
const schema = z.object({
|
||||
username: z.string().max(255),
|
||||
username: z.string().max(255).optional(),
|
||||
password: z.string().max(255).optional(),
|
||||
role: userRoleParam,
|
||||
role: userRoleParam.optional(),
|
||||
});
|
||||
|
||||
const { auth, body, error } = await parseRequest(request, schema);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue