mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 10:35:35 +01:00
parent
c90bd941b5
commit
561cde6e7e
20 changed files with 133 additions and 98 deletions
|
|
@ -55,9 +55,6 @@ export default async (
|
|||
await useCors(req, res);
|
||||
await useAuth(req, res);
|
||||
|
||||
const {
|
||||
user: { id: userId },
|
||||
} = req.auth;
|
||||
const {
|
||||
id: websiteId,
|
||||
type,
|
||||
|
|
@ -72,7 +69,7 @@ export default async (
|
|||
} = req.query;
|
||||
|
||||
if (req.method === 'GET') {
|
||||
if (!(await canViewWebsite(userId, websiteId))) {
|
||||
if (!(await canViewWebsite(req.auth, websiteId))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue