Fixed admin checks.

This commit is contained in:
Mike Cao committed 2022-12-13 08:41:13 -08:00
1 parent da49543b91
commit cb4c8accea
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ export default async (
}
if (req.method === 'DELETE') {
if (isAdmin) {
if (!isAdmin) {
return unauthorized(res);
}
+2 -2
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);
}