Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Filter out null instead of non-null values
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent e51452a commit 8e5c381
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions functions/api/mod-queue/list.ts
Expand Up @@ -9,9 +9,9 @@ export async function onRequestGet(context: RequestContext) {
report: "reports",
};
const types: { [k: string]: string } = {
appeal: `appeal`,
gma: `gameappeal`,
report: `report`,
appeal: "appeal",
gma: "gameappeal",
report: "report",
};
const permissions: { [k: string]: number[] } = {
appeal: [1 << 0, 1 << 1],
Expand Down Expand Up @@ -61,7 +61,7 @@ export async function onRequestGet(context: RequestContext) {
);
}

return new Response(JSON.stringify(items.filter((v) => v === null)), {
return new Response(JSON.stringify(items.filter((v) => v !== null)), {
headers: {
"content-type": "application/json",
},
Expand Down

0 comments on commit 8e5c381

Please sign in to comment.