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

Function gscQueries

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

Source from the content-addressed store, hash-verified

691}
692
693export async function gscQueries(
694 req: FastifyRequest<{ Params: { projectId?: string }; Querystring: z.infer<typeof zGscLimitQuery> }>,
695 reply: FastifyReply
696) {
697 const projectId = await getProjectId(req as RequestWithProjectParam);
698 const { startDate, endDate } = await resolveDates(projectId, req.query);
699 return reply.send(await gscGetTopQueriesCore({ projectId, startDate, endDate, limit: req.query.limit }));
700}
701
702export const zGscQueryDetailsQuery = zDateRange.extend({ query: z.string() });
703

Callers

nothing calls this directly

Calls 4

gscGetTopQueriesCoreFunction · 0.90
getProjectIdFunction · 0.70
resolveDatesFunction · 0.70
sendMethod · 0.45

Tested by

no test coverage detected