New schema for pixels and links.

This commit is contained in:
Mike Cao 2025-08-13 20:27:54 -07:00
parent c60e8b3d23
commit 88639dfe83
67 changed files with 993 additions and 208 deletions

View file

@ -2,7 +2,7 @@ import { z } from 'zod';
import { unauthorized, json } from '@/lib/response';
import { getUserWebsites } from '@/queries/prisma/website';
import { pagingParams, searchParams } from '@/lib/schema';
import { parseRequest } from '@/lib/request';
import { getQueryFilters, parseRequest } from '@/lib/request';
export async function GET(request: Request, { params }: { params: Promise<{ userId: string }> }) {
const schema = z.object({
@ -22,7 +22,9 @@ export async function GET(request: Request, { params }: { params: Promise<{ user
return unauthorized();
}
const websites = await getUserWebsites(userId, query);
const filters = await getQueryFilters(query);
const websites = await getUserWebsites(userId, filters);
return json(websites);
}