mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 18:45: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
|
|
@ -41,15 +41,17 @@ export default async (
|
|||
|
||||
const { name, domain, shareId } = req.body;
|
||||
|
||||
let website;
|
||||
|
||||
try {
|
||||
await updateWebsite(websiteId, { name, domain, shareId });
|
||||
website = await updateWebsite(websiteId, { name, domain, shareId });
|
||||
} catch (e: any) {
|
||||
if (e.message.includes('Unique constraint') && e.message.includes('share_id')) {
|
||||
return serverError(res, 'That share ID is already taken.');
|
||||
}
|
||||
}
|
||||
|
||||
return ok(res);
|
||||
return ok(res, website);
|
||||
}
|
||||
|
||||
if (req.method === 'DELETE') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue