feat(donors): Resolve donations with donors via pagination

This commit is contained in:
2023-04-19 18:10:26 +02:00
parent b9fe9f1c24
commit 12a9ae2493
2 changed files with 12 additions and 1 deletions

View File

@@ -53,7 +53,9 @@ export class ResponseDonation implements IResponse {
*/
public constructor(donation: Donation) {
this.id = donation.id;
this.donor = donation.donor.toResponse();
if (donation.donor) {
this.donor = donation.donor.toResponse();
}
this.amount = donation.amount;
this.paidAmount = donation.paidAmount || 0;
if (this.paidAmount < this.amount) {