Skip to content

Commit

Permalink
Merge pull request #8 from ezequielramos/main
Browse files Browse the repository at this point in the history
adding looks like confidence
  • Loading branch information
ezequielramos authored Jun 12, 2024
2 parents 7408b42 + e61407c commit 8062c84
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/controllers/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 };

0 comments on commit 8062c84

Please sign in to comment.