mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 01:55:36 +01:00
Remove webisite.teamId related code. Clean up queries.
This commit is contained in:
parent
081a126c01
commit
0335fd3529
4 changed files with 8 additions and 19 deletions
|
|
@ -10,7 +10,6 @@ export interface WebsitesRequestBody {
|
|||
name: string;
|
||||
domain: string;
|
||||
shareId: string;
|
||||
teamId?: string;
|
||||
}
|
||||
|
||||
export default async (
|
||||
|
|
@ -31,9 +30,9 @@ export default async (
|
|||
}
|
||||
|
||||
if (req.method === 'POST') {
|
||||
const { name, domain, shareId, teamId } = req.body;
|
||||
const { name, domain, shareId } = req.body;
|
||||
|
||||
if (!(await canCreateWebsite(req.auth, teamId))) {
|
||||
if (!(await canCreateWebsite(req.auth))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
@ -44,11 +43,7 @@ export default async (
|
|||
shareId,
|
||||
};
|
||||
|
||||
if (teamId) {
|
||||
data.teamId = teamId;
|
||||
} else {
|
||||
data.userId = userId;
|
||||
}
|
||||
data.userId = userId;
|
||||
|
||||
const website = await createWebsite(data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue