mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 09:05:36 +01:00
Zen components conversion.
This commit is contained in:
parent
aac1a12e51
commit
5999bf6256
142 changed files with 1235 additions and 1454 deletions
|
|
@ -2,7 +2,7 @@ import { z } from 'zod';
|
|||
import { unauthorized, json, badRequest } from '@/lib/response';
|
||||
import { canAddUserToTeam, canViewTeam } from '@/lib/auth';
|
||||
import { parseRequest } from '@/lib/request';
|
||||
import { pagingParams, roleParam } from '@/lib/schema';
|
||||
import { pagingParams, teamRoleParam } from '@/lib/schema';
|
||||
import { createTeamUser, getTeamUser, getTeamUsers } from '@/queries';
|
||||
|
||||
export async function GET(request: Request, { params }: { params: Promise<{ teamId: string }> }) {
|
||||
|
|
@ -48,7 +48,7 @@ export async function GET(request: Request, { params }: { params: Promise<{ team
|
|||
export async function POST(request: Request, { params }: { params: Promise<{ teamId: string }> }) {
|
||||
const schema = z.object({
|
||||
userId: z.string().uuid(),
|
||||
role: roleParam,
|
||||
role: teamRoleParam,
|
||||
});
|
||||
|
||||
const { auth, body, error } = await parseRequest(request, schema);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue