Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fix error when updating website.
Brian Cao371425ab60ee
diff --git a/pages/api/websites/[id]/index.ts b/pages/api/websites/[id]/index.tsindex f26313c49..7b634e13c 100644--- a/pages/api/websites/[id]/index.ts+++ b/pages/api/websites/[id]/index.ts@@ -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.');}diff --git a/tsconfig.json b/tsconfig.jsonindex cbb5413f8..b022d603e 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -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"]}