Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Create game appeal middleware
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 1a7c4a2 commit 613c9ef
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions functions/api/game-appeals/_middleware.ts
@@ -0,0 +1,11 @@
export async function onRequest(context: RequestContext) {
if (!(context.data.current_user.permissions & (1 << 5)))
return new Response('{"error":"Forbidden"}', {
headers: {
"content-type": "application/json",
},
status: 403,
});

return await context.next();
}

0 comments on commit 613c9ef

Please sign in to comment.