Zen components conversion.

This commit is contained in:
Mike Cao committed 2025-03-07 03:11:58 -08:00
1 parent aac1a12e51
commit 5999bf6256
142 files changed
+1235 -1454

No files matched your search

+2 -2
View File
@@ -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);