Filter out null instead of non-null values

This commit is contained in:
regalijan 2023-10-19 16:49:30 -04:00
parent e51452a85e
commit 8e5c3810a6
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -9,9 +9,9 @@ export async function onRequestGet(context: RequestContext) {
report: "reports", report: "reports",
}; };
const types: { [k: string]: string } = { const types: { [k: string]: string } = {
appeal: `appeal`, appeal: "appeal",
gma: `gameappeal`, gma: "gameappeal",
report: `report`, report: "report",
}; };
const permissions: { [k: string]: number[] } = { const permissions: { [k: string]: number[] } = {
appeal: [1 << 0, 1 << 1], appeal: [1 << 0, 1 << 1],
@ -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: { headers: {
"content-type": "application/json", "content-type": "application/json",
}, },