Fix error when updating website.

This commit is contained in:
Brian Cao 2022-11-21 11:39:59 -08:00
parent 82d1f1ba2c
commit 371425ab60
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ export default async (
if (req.method === 'POST') {
const { ...data } = req.body;
if (!data.userId && !data.teamId) {
if (data.userId && data.userId === null && data.teamId && data.teamId === null) {
badRequest(res, 'A website must be assigned to a User or Team.');
}

View File

@ -23,6 +23,6 @@
"noEmit": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "queries/admin/website/getAllWebsites.ts"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}