Fix teamId check.
parent
39ea100f2a
commit
2d99615d30
|
@ -36,7 +36,7 @@ export default async (
|
||||||
if (req.method === 'POST') {
|
if (req.method === 'POST') {
|
||||||
const { name, domain, shareId, teamId } = req.body;
|
const { name, domain, shareId, teamId } = req.body;
|
||||||
|
|
||||||
if (teamId && !(await canCreateWebsite(req.auth, teamId))) {
|
if (!(await canCreateWebsite(req.auth, teamId))) {
|
||||||
return unauthorized(res);
|
return unauthorized(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ export default async (
|
||||||
if (req.method === 'POST') {
|
if (req.method === 'POST') {
|
||||||
const { name, domain, shareId, teamId } = req.body;
|
const { name, domain, shareId, teamId } = req.body;
|
||||||
|
|
||||||
if (teamId && !(await canCreateWebsite(req.auth, teamId))) {
|
if (!(await canCreateWebsite(req.auth, teamId))) {
|
||||||
return unauthorized(res);
|
return unauthorized(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue