mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Report updates.
This commit is contained in:
parent
40f53e8856
commit
0fb93ff00b
147 changed files with 1095 additions and 628 deletions
|
|
@ -1,13 +0,0 @@
|
|||
import { NextApiResponse } from 'next';
|
||||
import { useAuth } from 'lib/middleware';
|
||||
import { NextApiRequestQueryBody, User } from 'lib/types';
|
||||
import { ok } from 'next-basics';
|
||||
|
||||
export default async (
|
||||
req: NextApiRequestQueryBody<unknown, unknown>,
|
||||
res: NextApiResponse<User>,
|
||||
) => {
|
||||
await useAuth(req, res);
|
||||
|
||||
return ok(res, req.auth.user);
|
||||
};
|
||||
|
|
@ -35,7 +35,7 @@ export default async (
|
|||
|
||||
const { id: websiteId } = req.query;
|
||||
|
||||
if (req.method === 'POST') {
|
||||
if (req.method === 'GET') {
|
||||
if (!(await canViewWebsite(req.auth, websiteId))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue