update api to new CH columns

This commit is contained in:
Francis Cao 2022-10-08 16:12:33 -07:00
parent 36edbe2f4c
commit 96add409b6
19 changed files with 74 additions and 48 deletions

View file

@ -44,6 +44,7 @@ export default async (req, res) => {
const { id, type, start_at, end_at, url, referrer, os, browser, device, country } = req.query;
const websiteId = +id;
const website_uuid = id;
const startDate = new Date(+start_at);
const endDate = new Date(+end_at);
@ -106,7 +107,7 @@ export default async (req, res) => {
query: type === 'query' && table !== 'event' ? true : undefined,
};
const data = await getPageviewMetrics(websiteId, {
const data = await getPageviewMetrics(websiteId, website_uuid, {
startDate,
endDate,
column,