More api problems
This commit is contained in:
parent
8f4947c8ac
commit
d265436555
@ -39,9 +39,11 @@ export async function onRequestGet(context: RequestContext): Promise<any> {
|
||||
)
|
||||
.bind(before, !Number(showClosed))
|
||||
.all();
|
||||
rows.results.forEach((r) => {
|
||||
rows.results = rows.results.map((r) => {
|
||||
r.user = JSON.parse(r.user);
|
||||
delete r.user.email;
|
||||
|
||||
return r;
|
||||
});
|
||||
break;
|
||||
|
||||
@ -63,6 +65,15 @@ export async function onRequestGet(context: RequestContext): Promise<any> {
|
||||
)
|
||||
.bind(before)
|
||||
.all();
|
||||
|
||||
rows.results.map((r) => {
|
||||
r.decisions = JSON.parse(r.decisions);
|
||||
r.user = JSON.parse(r.user);
|
||||
|
||||
delete r.user.email;
|
||||
|
||||
return r;
|
||||
});
|
||||
break;
|
||||
|
||||
case "report":
|
||||
@ -72,14 +83,17 @@ export async function onRequestGet(context: RequestContext): Promise<any> {
|
||||
.bind(before, !Number(showClosed))
|
||||
.all();
|
||||
|
||||
rows.results.forEach((r) => {
|
||||
rows.results = rows.results.map((r) => {
|
||||
r.attachments = JSON.parse(r.attachments);
|
||||
r.target_ids = JSON.parse(r.target_ids);
|
||||
r.target_usernames = JSON.parse(r.target_usernames);
|
||||
|
||||
if (!r.user) return;
|
||||
if (r.user) {
|
||||
r.user = JSON.parse(r.user);
|
||||
delete r.user.email;
|
||||
}
|
||||
|
||||
r.user = JSON.parse(r.user);
|
||||
return r;
|
||||
});
|
||||
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user