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

Function gscQueryDetails

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

Source from the content-addressed store, hash-verified

702export const zGscQueryDetailsQuery = zDateRange.extend({ query: z.string() });
703
704export async function gscQueryDetails(
705 req: FastifyRequest<{ Params: { projectId?: string }; Querystring: z.infer<typeof zGscQueryDetailsQuery> }>,
706 reply: FastifyReply
707) {
708 const projectId = await getProjectId(req as RequestWithProjectParam);
709 const { startDate, endDate } = await resolveDates(projectId, req.query);
710 return reply.send(await gscGetQueryDetailsCore({ projectId, startDate, endDate, query: req.query.query }));
711}
712
713export const zGscOpportunitiesQuery = zDateRange.extend({ minImpressions: z.number().int().min(1).default(50) });
714

Callers

nothing calls this directly

Calls 4

gscGetQueryDetailsCoreFunction · 0.90
getProjectIdFunction · 0.70
resolveDatesFunction · 0.70
sendMethod · 0.45

Tested by

no test coverage detected