Fixed admin checks.

This commit is contained in:
Mike Cao 2022-12-13 08:41:13 -08:00
parent da49543b91
commit cb4c8accea
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ export default async (
}
if (req.method === 'DELETE') {
if (isAdmin) {
if (!isAdmin) {
return unauthorized(res);
}

View File

@ -23,7 +23,7 @@ export default async (
} = req.auth;
if (req.method === 'GET') {
if (isAdmin) {
if (!isAdmin) {
return unauthorized(res);
}
@ -33,7 +33,7 @@ export default async (
}
if (req.method === 'POST') {
if (isAdmin) {
if (!isAdmin) {
return unauthorized(res);
}