mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 11:05:36 +01:00
Handle website delete. Added response helper functions.
This commit is contained in:
parent
0a411a9ad6
commit
c4b75e4aec
31 changed files with 314 additions and 96 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { getMetrics } from 'lib/db';
|
||||
import { useAuth } from 'lib/middleware';
|
||||
import { ok } from 'lib/response';
|
||||
|
||||
export default async (req, res) => {
|
||||
await useAuth(req, res);
|
||||
|
|
@ -17,5 +18,5 @@ export default async (req, res) => {
|
|||
return obj;
|
||||
}, {});
|
||||
|
||||
return res.status(200).json(stats);
|
||||
return ok(res, stats);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue