mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
change const
This commit is contained in:
parent
689b732829
commit
075d77abac
3 changed files with 5 additions and 5 deletions
|
|
@ -9,7 +9,7 @@ import {
|
|||
hashPassword,
|
||||
} from 'next-basics';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { TYPE_ACCOUNT } from 'lib/constants';
|
||||
import { TYPE_USER } from 'lib/constants';
|
||||
|
||||
export default async (req, res) => {
|
||||
await useAuth(req, res);
|
||||
|
|
@ -17,7 +17,7 @@ export default async (req, res) => {
|
|||
const { current_password, new_password } = req.body;
|
||||
const { id } = req.query;
|
||||
|
||||
if (!(await allowQuery(req, TYPE_ACCOUNT))) {
|
||||
if (!(await allowQuery(req, TYPE_USER))) {
|
||||
return unauthorized(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue