change const

This commit is contained in:
Brian Cao 2022-11-01 09:56:43 -07:00
parent 689b732829
commit 075d77abac
3 changed files with 5 additions and 5 deletions

View file

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