Rewrite admin.

This commit is contained in:
Brian Cao 2022-12-25 22:00:20 -08:00
parent f4db04c3c6
commit 6cf6a97b4d
114 changed files with 2174 additions and 1820 deletions

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