mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Add support for MySQL.
This commit is contained in:
parent
e309376150
commit
a248f35db2
9 changed files with 302 additions and 102 deletions
|
|
@ -7,11 +7,7 @@ export default async (req, res) => {
|
|||
|
||||
const { id, start_at, end_at } = req.query;
|
||||
|
||||
const metrics = await getMetrics(
|
||||
+id,
|
||||
new Date(+start_at).toISOString(),
|
||||
new Date(+end_at).toISOString(),
|
||||
);
|
||||
const metrics = await getMetrics(+id, new Date(+start_at), new Date(+end_at));
|
||||
|
||||
const stats = Object.keys(metrics[0]).reduce((obj, key) => {
|
||||
obj[key] = +metrics[0][key];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue