Skip to content

Conversation

@jmgasper
Copy link
Contributor

No description provided.

@jmgasper jmgasper merged commit 98cd538 into master Nov 18, 2025
2 checks passed
expect(memberUpdateMock).toHaveBeenCalledWith({
where: { userId },
expect(memberUpdateManyMock).toHaveBeenCalledWith({
where: { userId: BigInt(userId) },

Choose a reason for hiding this comment

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

[⚠️ correctness]
The use of BigInt for userId in the where clause is inconsistent with other parts of the code where userId is used as a number. Ensure that the data type is consistent across the application to avoid potential type-related issues.

expect(memberUpdateMock).toHaveBeenCalledWith({
where: { userId },
expect(memberUpdateManyMock).toHaveBeenCalledWith({
where: { userId: BigInt(userId) },

Choose a reason for hiding this comment

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

[⚠️ correctness]
The use of BigInt for userId in the where clause is inconsistent with other parts of the code where userId is used as a number. Ensure that the data type is consistent across the application to avoid potential type-related issues.

}

if (emailChanged) {
const memberUserId = BigInt(userId);

Choose a reason for hiding this comment

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

[⚠️ correctness]
The conversion of userId to BigInt is necessary for the where clause in the memberPrisma.member.update method. Ensure that userId is always a valid number that can be safely converted to BigInt to avoid runtime errors.

await this.memberPrisma.member.update({
where: { userId },
const updateResult = await this.memberPrisma.member.update({
where: { userId: memberUserId },

Choose a reason for hiding this comment

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

[💡 maintainability]
Consider adding error handling for the updateResult to ensure that the update operation was successful. This can help in diagnosing issues if the update fails silently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants