Updated query filters. Updated packages.

This commit is contained in:
Mike Cao 2020-09-28 20:23:42 -07:00
parent 6bb34cd3a5
commit 11d8b19279
7 changed files with 35 additions and 17 deletions

View file

@ -14,7 +14,7 @@ export default async (req, res) => {
const startDate = new Date(+start_at);
const endDate = new Date(+end_at);
const metrics = await getMetrics(websiteId, startDate, endDate, url);
const metrics = await getMetrics(websiteId, startDate, endDate, { url });
const stats = Object.keys(metrics[0]).reduce((obj, key) => {
obj[key] = Number(metrics[0][key]) || 0;