This commit is contained in:
Brian Cao 2022-10-11 19:37:38 -07:00
parent b0bed5e73a
commit c147742d7a
18 changed files with 84 additions and 52 deletions

View file

@ -14,10 +14,20 @@ export default async (req, res) => {
return unauthorized(res);
}
const { id, start_at, end_at, unit, tz, url, referrer, os, browser, device, country } =
req.query;
const {
id: websiteId,
start_at,
end_at,
unit,
tz,
url,
referrer,
os,
browser,
device,
country,
} = req.query;
const websiteId = +id;
const startDate = new Date(+start_at);
const endDate = new Date(+end_at);