Filter out null instead of non-null values
This commit is contained in:
parent
e51452a85e
commit
8e5c3810a6
@ -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],
|
||||
@ -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",
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user