MCPcopy
hub / github.com/umami-software/umami / GET

Function GET

src/app/api/pixels/route.ts:9–27  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

7import { createPixel, getUserPixels } from '@/queries/prisma';
8
9export async function GET(request: Request) {
10 const schema = z.object({
11 ...pagingParams,
12 ...searchParams,
13 ...sortingParams,
14 });
15
16 const { auth, query, error } = await parseRequest(request, schema);
17
18 if (error) {
19 return error();
20 }
21
22 const filters = await getQueryFilters(query);
23
24 const links = await getUserPixels(auth.user.id, filters);
25
26 return json(links);
27}
28
29export async function POST(request: Request) {
30 const schema = z.object({

Callers

nothing calls this directly

Calls 5

parseRequestFunction · 0.90
getQueryFiltersFunction · 0.90
getUserPixelsFunction · 0.90
jsonFunction · 0.90
errorFunction · 0.85

Tested by

no test coverage detected