Skip to content

Commit

Permalink
updateAffiliateBankPayment: Use value of donation's updatedAt field
Browse files Browse the repository at this point in the history
When passing undefined to the query, prisma still updates the updatedAt field, as it uses default property
  • Loading branch information
sashko9807 committed Nov 1, 2023
1 parent d5754e8 commit 87df4e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/api/src/donations/donations.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ export class DonationsService {
this.vaultService.incrementVaultAmount(donationDto.targetVaultId, donationDto.amount, tx),
tx.donation.update({
where: { id: donationDto.id },
data: { status: DonationStatus.succeeded, updatedAt: undefined },
data: { status: DonationStatus.succeeded, updatedAt: donationDto.updatedAt },
}),
])
})
Expand Down

0 comments on commit 87df4e2

Please sign in to comment.