From 52b20c97838bf6a900c46066b001617809ea02d1 Mon Sep 17 00:00:00 2001 From: Shailesh Pandit Date: Sat, 27 Nov 2021 15:40:29 +0530 Subject: [PATCH] Rename personId to id --- src/services/machineLearning/machineLearningService.ts | 6 +++--- src/utils/machineLearning/types.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/machineLearning/machineLearningService.ts b/src/services/machineLearning/machineLearningService.ts index bf7ae66ed..15970a384 100644 --- a/src/services/machineLearning/machineLearningService.ts +++ b/src/services/machineLearning/machineLearningService.ts @@ -323,14 +323,14 @@ class MachineLearningService { .map((f) => allFaces[f]) .filter((f) => f); const person: Person = { - personId: index, + id: index, files: faces.map((f) => f.fileId), }; - await mlPeopleStore.setItem(person.personId.toString(), person); + await mlPeopleStore.setItem(person.id.toString(), person); faces.forEach((face) => { - face.personId = person.personId; + face.personId = person.id; }); // console.log("Creating person: ", person, faces); } diff --git a/src/utils/machineLearning/types.ts b/src/utils/machineLearning/types.ts index 2ee04657d..731800348 100644 --- a/src/utils/machineLearning/types.ts +++ b/src/utils/machineLearning/types.ts @@ -129,7 +129,7 @@ export interface Face extends FaceWithEmbedding { } export interface Person { - personId: number; + id: number; name?: string; files: Array; }