MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / gscPages

Function gscPages

apps/api/src/controllers/insights.controller.ts:673–680  ·  view source on GitHub ↗
(
  req: FastifyRequest<{ Params: { projectId?: string }; Querystring: z.infer<typeof zGscLimitQuery> }>,
  reply: FastifyReply
)

Source from the content-addressed store, hash-verified

671export const zGscLimitQuery = zDateRange.extend({ limit: z.number().int().min(1).max(1000).default(100) });
672
673export async function gscPages(
674 req: FastifyRequest<{ Params: { projectId?: string }; Querystring: z.infer<typeof zGscLimitQuery> }>,
675 reply: FastifyReply
676) {
677 const projectId = await getProjectId(req as RequestWithProjectParam);
678 const { startDate, endDate } = await resolveDates(projectId, req.query);
679 return reply.send(await gscGetTopPagesCore({ projectId, startDate, endDate, limit: req.query.limit }));
680}
681
682export const zGscPageDetailsQuery = zDateRange.extend({ page: z.string().url() });
683

Callers

nothing calls this directly

Calls 4

gscGetTopPagesCoreFunction · 0.90
getProjectIdFunction · 0.70
resolveDatesFunction · 0.70
sendMethod · 0.45

Tested by

no test coverage detected