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

Function getPages

apps/api/src/controllers/insights.controller.ts:244–254  ·  view source on GitHub ↗
(
  req: FastifyRequest<{
    Params: { projectId: string };
    Querystring: z.infer<typeof zGetTopPagesQuery>;
  }>
)

Source from the content-addressed store, hash-verified

242});
243
244export async function getPages(
245 req: FastifyRequest<{
246 Params: { projectId: string };
247 Querystring: z.infer<typeof zGetTopPagesQuery>;
248 }>
249) {
250 const projectId = await getProjectId(req as RequestWithProjectParam);
251 const { timezone } = await getSettingsForProject(projectId);
252 const { startDate, endDate } = getChartStartEndDate(req.query, timezone);
253 return overviewService.getTopPages({ projectId, filters: req.query.filters, startDate, endDate, timezone });
254}
255
256export const zEntryExitQuery = zDateRange.extend({
257 mode: z.enum(['entry', 'exit']).default('entry'),

Callers

nothing calls this directly

Calls 4

getSettingsForProjectFunction · 0.90
getChartStartEndDateFunction · 0.90
getProjectIdFunction · 0.70
getTopPagesMethod · 0.45

Tested by

no test coverage detected