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",
|
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",
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user