diff --git a/package.json b/package.json index 78b15ee2a..95c410c60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "2.3.0", + "version": "2.3.1", "description": "A simple, fast, privacy-focused alternative to Google Analytics.", "author": "Mike Cao ", "license": "MIT", diff --git a/pages/api/websites/[id]/reset.ts b/pages/api/websites/[id]/reset.ts index dc98c5913..23b5305db 100644 --- a/pages/api/websites/[id]/reset.ts +++ b/pages/api/websites/[id]/reset.ts @@ -1,5 +1,5 @@ import { NextApiRequestQueryBody } from 'lib/types'; -import { canViewWebsite } from 'lib/auth'; +import { canUpdateWebsite } from 'lib/auth'; import { useAuth, useCors } from 'lib/middleware'; import { NextApiResponse } from 'next'; import { methodNotAllowed, ok, unauthorized } from 'next-basics'; @@ -19,7 +19,7 @@ export default async ( const { id: websiteId } = req.query; if (req.method === 'POST') { - if (!(await canViewWebsite(req.auth, websiteId))) { + if (!(await canUpdateWebsite(req.auth, websiteId))) { return unauthorized(res); }