diff --git a/functions/gcloud.ts b/functions/gcloud.ts index e5d4c5b..f1d6514 100644 --- a/functions/gcloud.ts +++ b/functions/gcloud.ts @@ -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 ?? [] + ); }