Create game appeal middleware
This commit is contained in:
parent
1a7c4a27fa
commit
613c9ef5ca
11
functions/api/game-appeals/_middleware.ts
Normal file
11
functions/api/game-appeals/_middleware.ts
Normal file
@ -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();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user