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

Function resolveDates

apps/api/src/controllers/insights.controller.ts:99–111  ·  view source on GitHub ↗
(
  projectId: string,
  data: DateRangeInput
)

Source from the content-addressed store, hash-verified

97}
98
99async function resolveDates(
100 projectId: string,
101 data: DateRangeInput
102): Promise<{ startDate: string; endDate: string }> {
103 if (!data.range || data.startDate) {
104 return resolveDateRange(data.startDate, data.endDate);
105 }
106 const { timezone } = await getSettingsForProject(projectId);
107 return getChartStartEndDate(
108 { startDate: data.startDate, endDate: data.endDate, range: data.range! },
109 timezone
110 );
111}
112
113// ---------------------------------------------------------------------------
114// Analytics — overview

Callers 15

getOverviewFunction · 0.70
getTopPagesFunction · 0.70
getEntryExitPagesFunction · 0.70
getPagePerformanceFunction · 0.70
getFunnelFunction · 0.70
getTrafficReferrersFunction · 0.70
getTrafficGeoFunction · 0.70
getTrafficDevicesFunction · 0.70
getUserFlowFunction · 0.70
gscOverviewFunction · 0.70
gscPagesFunction · 0.70
gscPageDetailsFunction · 0.70

Calls 3

resolveDateRangeFunction · 0.90
getSettingsForProjectFunction · 0.90
getChartStartEndDateFunction · 0.90

Tested by

no test coverage detected