mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Show active visitor count.
This commit is contained in:
parent
9f6e17b986
commit
b96cb0d975
14 changed files with 158 additions and 35 deletions
11
pages/api/website/[id]/active.js
Normal file
11
pages/api/website/[id]/active.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue