Update metric tables when filtering on referrer

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf 2022-03-20 22:14:54 +01:00
parent bb7d26d19f
commit 35f9c7ef6c
3 changed files with 13 additions and 4 deletions

View file

@ -30,7 +30,7 @@ export default async (req, res) => {
return unauthorized(res);
}
const { id, type, start_at, end_at, url } = req.query;
const { id, type, start_at, end_at, url, referrer } = req.query;
const websiteId = +id;
const startDate = new Date(+start_at);
@ -75,6 +75,7 @@ export default async (req, res) => {
{
domain,
url: type !== 'url' && url,
referrer: referrer,
},
);