mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Chart component. Update web utils.
This commit is contained in:
parent
f947c7770b
commit
590a70c2ff
6 changed files with 159 additions and 8 deletions
10
pages/api/website/[id]/pageviews.js
Normal file
10
pages/api/website/[id]/pageviews.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { getPageviews } from 'lib/db';
|
||||
|
||||
export default async (req, res) => {
|
||||
console.log(req.query);
|
||||
const { id, start_at, end_at } = req.query;
|
||||
|
||||
const pageviews = await getPageviews(+id, new Date(+start_at), new Date(+end_at));
|
||||
|
||||
res.status(200).json({ pageviews });
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue