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

Function getProjectId

apps/api/src/controllers/insights.controller.ts:85–93  ·  view source on GitHub ↗
(req: RequestWithProjectParam)

Source from the content-addressed store, hash-verified

83}>;
84
85function getProjectId(req: RequestWithProjectParam): Promise<string> {
86 const client = req.client!;
87 return resolveClientProjectId({
88 clientType: client.type === 'root' ? 'root' : 'read',
89 clientProjectId: client.projectId ?? null,
90 organizationId: client.organizationId,
91 inputProjectId: req.params.projectId,
92 });
93}
94
95function getOrgId(req: RequestWithProjectParam): string {
96 return req.client!.organizationId;

Callers 15

getOverviewFunction · 0.70
getMetricsFunction · 0.70
getLiveVisitorsFunction · 0.70
getActiveUsersFunction · 0.70
getRetentionSeriesFunction · 0.70
getRetentionCohortFunction · 0.70
getTopPagesFunction · 0.70
getPagesFunction · 0.70
getEntryExitPagesFunction · 0.70
getPagePerformanceFunction · 0.70
getOverviewGenericFunction · 0.70
getFunnelFunction · 0.70

Calls 1

resolveClientProjectIdFunction · 0.90

Tested by

no test coverage detected