Skip to content

PM-1304 - add audit trail when description gets updated #77

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

Merged
merged 1 commit into from
Jun 23, 2025

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
@@ -119,6 +122,18 @@ export class AdminService {
},
}),
);

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.

@@ -546,6 +561,7 @@ export class AdminService {
},
},
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