Skip to content
Merged
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 src/services/MemberTraitService.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ function convertPrismaToRes (traitData, userId, traitIds = TRAIT_IDS) {
_.forEach(ret, r => {
r.createdAt = r.createdAt ? r.createdAt.getTime() : null
r.updatedAt = r.updatedAt ? r.updatedAt.getTime() : null
r.createdBy = helper.bigIntToNumber(r.createdBy)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
Ensure that helper.bigIntToNumber correctly handles all potential values of r.createdBy, including very large numbers that could cause precision loss when converted to a JavaScript Number.

r.updatedBy = helper.bigIntToNumber(r.updatedBy)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
Ensure that helper.bigIntToNumber correctly handles all potential values of r.updatedBy, including very large numbers that could cause precision loss when converted to a JavaScript Number.

})
return ret
}
Expand Down