add subdivision1/2, cities to query logic

This commit is contained in:
Francis Cao 2023-02-20 09:04:20 -08:00
parent 6bacfa5892
commit 55a586fe27
16 changed files with 184 additions and 57 deletions

View file

@ -21,6 +21,9 @@ export interface WebsitePageviewRequestQuery {
browser?: string;
device?: string;
country?: string;
subdivision1?: string;
subdivision2?: string;
city?: string;
}
export default async (
@ -42,6 +45,9 @@ export default async (
browser,
device,
country,
subdivision1,
subdivision2,
city,
} = req.query;
if (req.method === 'GET') {
@ -70,6 +76,9 @@ export default async (
browser,
device,
country,
subdivision1,
subdivision2,
city,
},
}),
getPageviewStats(websiteId, {
@ -84,6 +93,9 @@ export default async (
browser,
device,
country,
subdivision1,
subdivision2,
city,
},
}),
]);