Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change GME middleare permission check
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent cef3263 commit 13dfe7d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion functions/api/gme/_middleware.ts
@@ -1,7 +1,14 @@
export async function onRequest(context: RequestContext) {
const { current_user: currentUser } = context.data;

if (!currentUser || !(currentUser & (1 << 5)))
if (
!currentUser ||
![
"165594923586945025",
"289372404541554689",
"396347223736057866",
].includes(currentUser.id)
)
return new Response('{"error":"Forbidden"}', {
headers: {
"content-type": "application/json",
Expand Down

0 comments on commit 13dfe7d

Please sign in to comment.