Return entire history in queryLogs function

This commit is contained in:
regalijan 2023-10-19 16:49:46 -04:00
parent e84b02c403
commit fe58ffd3fd
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -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 ?? []
);
}