Skip to content

Conversation

vas3a
Copy link
Collaborator

@vas3a vas3a commented Jun 23, 2025

No description provided.

@vas3a vas3a merged commit bb3f230 into dev Jun 23, 2025
1 check passed
}),
);

if (payment.installment_number === 1) {

Choose a reason for hiding this comment

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

medium
performance
Consider checking if body.description is different from payment.winnings.description before adding an audit entry. This will prevent unnecessary audit entries when the description hasn't actually changed.

transactions.push((tx) =>
this.addAudit(
userId,
winningsId,

Choose a reason for hiding this comment

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

high
correctness
Ensure that winningsId and userId are correctly defined and available in this context. If they are undefined or incorrect, it could lead to incorrect audit trail entries.

},
},
take: 1000,
orderBy: { created_at: 'desc' },

Choose a reason for hiding this comment

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

medium
performance
Ensure that the created_at field is indexed in the database to optimize the performance of the orderBy operation, especially since the query takes up to 1000 records.

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.

1 participant