Fix teamId check.

pull/1716/head
Brian Cao 2022-12-27 15:18:34 -08:00
parent 39ea100f2a
commit 2d99615d30
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ export default async (
if (req.method === 'POST') {
const { name, domain, shareId, teamId } = req.body;
if (teamId && !(await canCreateWebsite(req.auth, teamId))) {
if (!(await canCreateWebsite(req.auth, teamId))) {
return unauthorized(res);
}

View File

@ -36,7 +36,7 @@ export default async (
if (req.method === 'POST') {
const { name, domain, shareId, teamId } = req.body;
if (teamId && !(await canCreateWebsite(req.auth, teamId))) {
if (!(await canCreateWebsite(req.auth, teamId))) {
return unauthorized(res);
}