Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add inactivity prefix to fetch by id
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 1adda61 commit 17bca65
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions functions/api/mod-queue/[type]/[id].ts
Expand Up @@ -6,11 +6,15 @@ export async function onRequestGet(context: RequestContext) {
},
gma: {
permissions: [1 << 5],
prefix: `gameappeal_`,
prefix: "gameappeal_",
},
inactivity: {
permissions: [1 << 0, 1 << 4, 1 << 6, 1 << 7, 1 << 11],
prefix: "inactivity_",
},
report: {
permissions: [1 << 5],
prefix: `report_`,
prefix: "report_",
},
};

Expand All @@ -19,7 +23,7 @@ export async function onRequestGet(context: RequestContext) {

if (
!types[type]?.permissions.find(
(p) => context.data.current_user.permissions & p
(p) => context.data.current_user.permissions & p,
)
)
return new Response('{"error":"You cannot use this filter"}', {
Expand Down

0 comments on commit 17bca65

Please sign in to comment.