Insights report filters.

This commit is contained in:
Mike Cao committed 2023-08-09 15:06:19 -07:00
1 parent acbffed2ce
commit 5039349d57
7 files changed
+138 -87

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ import { canViewWebsite } from 'lib/auth';
import { useAuth, useCors } from 'lib/middleware';
import { NextApiResponse } from 'next';
import { badRequest, methodNotAllowed, ok, unauthorized } from 'next-basics';
import { EVENT_COLUMNS, SESSION_COLUMNS } from 'lib/constants';
import { EVENT_COLUMNS, FILTER_COLUMNS, SESSION_COLUMNS } from 'lib/constants';
import { getValues } from 'queries';
export interface WebsiteResetRequestQuery {
@@ -28,7 +28,7 @@ export default async (
return unauthorized(res);
}
const values = await getValues(websiteId, type as string);
const values = await getValues(websiteId, FILTER_COLUMNS[type as string]);
return ok(
res,