improve(api): increase limit 1000, allow both projectId and project_id

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-04-16 21:40:22 +02:00
parent e2254e78a9
commit 89ab8d08de
2 changed files with 16 additions and 20 deletions

View File

@@ -249,7 +249,9 @@ export async function getEvents(
const events = await chQuery<IClickhouseEvent>(sql);
const projectId = events[0]?.project_id;
if (options.profile && projectId) {
const ids = events.map((e) => e.profile_id);
const ids = events
.filter((e) => e.device_id !== e.profile_id)
.map((e) => e.profile_id);
const profiles = await getProfiles(ids, projectId);
const map = new Map<string, IServiceProfile>();