Add support for MySQL.

This commit is contained in:
Mike Cao committed 2020-08-11 20:05:40 -07:00
1 parent e309376150
commit a248f35db2
9 files changed
+302 -102

No files matched your search

+1 -5
View File
@@ -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];