diff --git a/apps/api/src/app/groups/docSchemas/group.ts b/apps/api/src/app/groups/docSchemas/group.ts index 36ae0626..494d5928 100644 --- a/apps/api/src/app/groups/docSchemas/group.ts +++ b/apps/api/src/app/groups/docSchemas/group.ts @@ -12,6 +12,8 @@ export class Group { @ApiProperty() treeDepth: number @ApiProperty() + fingerprint: string + @ApiProperty() fingerprintDuration: number @ApiProperty() createdAt: Date diff --git a/apps/api/src/app/groups/entities/group.entity.ts b/apps/api/src/app/groups/entities/group.entity.ts index fc050bc4..ac9223dd 100644 --- a/apps/api/src/app/groups/entities/group.entity.ts +++ b/apps/api/src/app/groups/entities/group.entity.ts @@ -28,6 +28,12 @@ export class Group { @Column({ name: "tree_depth" }) treeDepth: number + @Column({ + name: "tree_root", + nullable: true + }) + treeRoot: string + @Column({ name: "fingerprint_duration" }) fingerprintDuration: number diff --git a/apps/api/src/app/groups/groups.service.ts b/apps/api/src/app/groups/groups.service.ts index 42836a9c..963f8ce3 100644 --- a/apps/api/src/app/groups/groups.service.ts +++ b/apps/api/src/app/groups/groups.service.ts @@ -555,6 +555,10 @@ export class GroupsService { `Group with id '${groupId}' does not exist` ) } + /* group.treeRoot = BigNumber.from(this.cachedGroups.get(groupId).root).toNumber(); */ + group.treeRoot = this.cachedGroups.get(groupId).root.toString() + + group.fingerprint = this.cachedGroups.get(groupId).root.toString() return group } diff --git a/apps/api/src/app/groups/groups.utils.ts b/apps/api/src/app/groups/groups.utils.ts index b9eb38b9..6b3f15ac 100644 --- a/apps/api/src/app/groups/groups.utils.ts +++ b/apps/api/src/app/groups/groups.utils.ts @@ -10,6 +10,7 @@ export function mapGroupToResponseDTO( description: group.description, admin: group.adminId, treeDepth: group.treeDepth, + fingerprint: group.fingerprint, fingerprintDuration: group.fingerprintDuration, createdAt: group.createdAt, members: (group.members || []).map((m) => m.id),