Updated teams button.

This commit is contained in:
Mike Cao committed 2024-02-16 18:58:15 -08:00
1 parent 8048bc7866
commit 44393472cf
12 files changed
+46 -55

No files matched your search

+2 -2
View File
@@ -32,10 +32,10 @@ export default async (
await useValidate(schema, req, res);
const { user } = req.auth;
const { id: userId } = req.query;
const { userId } = req.query;
if (req.method === 'GET') {
if (!user.isAdmin && user.id !== userId) {
if (!user.isAdmin && (!userId || user.id !== userId)) {
return unauthorized(res);
}