Events chart.

This commit is contained in:
Mike Cao 2020-08-27 03:42:24 -07:00
parent 5f47f328be
commit 4618dc7f15
9 changed files with 220 additions and 226 deletions

View file

@ -1,4 +1,4 @@
import { getRankings, getEvents } from 'lib/queries';
import { getRankings, getEventRankings } from 'lib/queries';
import { ok, badRequest } from 'lib/response';
const sessionColumns = ['browser', 'os', 'device', 'country'];
@ -15,7 +15,7 @@ export default async (req, res) => {
}
if (type === 'event') {
const events = await getEvents(websiteId, startDate, endDate);
const events = await getEventRankings(websiteId, startDate, endDate);
return ok(res, events);
}