fix get event metrics card and create it's own query

This commit is contained in:
Francis Cao 2025-07-21 10:49:48 -07:00
parent ab0826d91a
commit a81b144cd6
5 changed files with 157 additions and 55 deletions

View file

@ -3,7 +3,7 @@ import { parseRequest, getRequestDateRange, getRequestFilters } from '@/lib/requ
import { unauthorized, json } from '@/lib/response';
import { canViewWebsite } from '@/lib/auth';
import { filterParams, timezoneParam, unitParam } from '@/lib/schema';
import { getEventMetrics } from '@/queries';
import { getEventStats } from '@/queries';
export async function GET(
request: Request,
@ -39,7 +39,7 @@ export async function GET(
unit,
};
const data = await getEventMetrics(websiteId, filters);
const data = await getEventStats(websiteId, filters);
return json(data);
}