Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: returning empty treeRoot #319

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/api/src/app/groups/docSchemas/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export class Group {
@ApiProperty()
treeDepth: number
@ApiProperty()
fingerprint: string
@ApiProperty()
fingerprintDuration: number
@ApiProperty()
createdAt: Date
Expand Down
6 changes: 6 additions & 0 deletions apps/api/src/app/groups/entities/group.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions apps/api/src/app/groups/groups.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/app/groups/groups.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Loading