Return entire history in queryLogs function
This commit is contained in:
parent
e84b02c403
commit
fe58ffd3fd
@ -261,18 +261,17 @@ export async function queryLogs(user: number, context: RequestContext) {
|
||||
throw new Error("Failed to query logs");
|
||||
}
|
||||
|
||||
const entityResult =
|
||||
return (
|
||||
(
|
||||
(await queryRequest.json()) as {
|
||||
batch: { entityResults: { [k: string]: { [k: string]: any } }[] };
|
||||
batch: {
|
||||
entityResults: {
|
||||
cursor: string;
|
||||
entity: { [k: string]: any };
|
||||
version: string;
|
||||
}[];
|
||||
};
|
||||
}
|
||||
).batch?.entityResults ?? [];
|
||||
|
||||
if (!entityResult.length) return {};
|
||||
|
||||
const entity = entityResult[0].entity.properties;
|
||||
delete entity.executor;
|
||||
delete entity.target;
|
||||
|
||||
return entity;
|
||||
).batch?.entityResults ?? []
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user