Don't include user emails in mod queue api
This commit is contained in:
parent
73074254b6
commit
c187b6816b
@ -64,11 +64,17 @@ export async function onRequestGet(context: RequestContext) {
|
||||
|
||||
if (results)
|
||||
for (const { id } of results) {
|
||||
const item = await context.env.DATA.get(`${prefix}_${id}`, {
|
||||
type: "json",
|
||||
});
|
||||
const item: { [k: string]: any } | null = await context.env.DATA.get(
|
||||
`${prefix}_${id}`,
|
||||
{
|
||||
type: "json",
|
||||
},
|
||||
);
|
||||
|
||||
if (item) items.push({ ...item, id });
|
||||
if (item) {
|
||||
delete item.user?.email;
|
||||
items.push({ ...item, id });
|
||||
}
|
||||
}
|
||||
|
||||
return new Response(JSON.stringify(items.filter((v) => v !== null)), {
|
||||
|
Loading…
x
Reference in New Issue
Block a user