Merge pull request #170 from mikecao/dev

Fix non-admin dashboard.
This commit is contained in:
Mike Cao 2020-09-18 00:35:15 -07:00 committed by GitHub
commit 0db2646ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 <mike@mikecao.com>",
"license": "MIT",

View File

@ -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);
}