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
Fixed admin checks.
Mike Caocb4c8accea05
diff --git a/pages/api/users/[id]/index.ts b/pages/api/users/[id]/index.tsindex cd0332d5b..bbf2e7cbb 100644--- a/pages/api/users/[id]/index.ts+++ b/pages/api/users/[id]/index.ts@@ -70,7 +70,7 @@ export default async (}if (req.method === 'DELETE') {- if (isAdmin) {+ if (!isAdmin) {return unauthorized(res);}diff --git a/pages/api/users/index.ts b/pages/api/users/index.tsindex 09f901c03..4abe4353d 100644--- a/pages/api/users/index.ts+++ b/pages/api/users/index.ts@@ -23,7 +23,7 @@ export default async (} = req.auth;if (req.method === 'GET') {- if (isAdmin) {+ if (!isAdmin) {return unauthorized(res);}@@ -33,7 +33,7 @@ export default async (}if (req.method === 'POST') {- if (isAdmin) {+ if (!isAdmin) {return unauthorized(res);}