umami/pages/api/website/[id]/active.js

12 lines
261 B
JavaScript
Raw Normal View History

2020-08-18 09:51:32 +02:00
import { getActiveVisitors } from 'lib/queries';
import { ok } from 'lib/response';
export default async (req, res) => {
const { id } = req.query;
const website_id = +id;
const result = await getActiveVisitors(website_id);
return ok(res, result);
};