From c932dc2810f9da11231b49ba1d921a7c7b99adf5 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 18 Sep 2020 00:34:22 -0700 Subject: [PATCH] Fix non-admin dashboard. --- package.json | 2 +- pages/api/websites.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 15de064c..4cb3b858 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.37.0", + "version": "0.38.0", "description": "A simple, fast, website analytics alternative to Google Analytics. ", "author": "Mike Cao ", "license": "MIT", diff --git a/pages/api/websites.js b/pages/api/websites.js index 42b6182c..6f51754f 100644 --- a/pages/api/websites.js +++ b/pages/api/websites.js @@ -10,7 +10,7 @@ export default async (req, res) => { const userId = +user_id; if (req.method === 'GET') { - if (userId !== current_user_id && !is_admin) { + if (userId && userId !== current_user_id && !is_admin) { return unauthorized(res); }