Add admin check.

This commit is contained in:
Brian Cao 2022-12-27 13:13:59 -08:00
parent c90bd941b5
commit 39ea100f2a
20 changed files with 133 additions and 98 deletions

View file

@ -28,7 +28,7 @@ export default async (
}
if (req.method === 'POST') {
if (!(await canCreateTeam(userId))) {
if (!(await canCreateTeam(req.auth))) {
return unauthorized(res);
}