diff --git a/src/controllers/events.ts b/src/controllers/events.ts index e09e85d..5ebfe28 100644 --- a/src/controllers/events.ts +++ b/src/controllers/events.ts @@ -46,7 +46,7 @@ interface EventFace { external_detector: boolean, meta: object, id: string, - looks_like_confidence: null, + looks_like_confidence: number | null, matched_lists: number[], detector_params: { quality: number, @@ -175,7 +175,15 @@ function resetEvents() { } function getEvents() { - return Object.values(events); + + const eventList = Object.values(events); + for (const event of eventList) { + if (event) { + event.looks_like_confidence = event.confidence; + } + } + + return eventList; } export { createEvent, getEvent, resetEvents, getEvents };