parent
71542bc388
commit
99307423c5
|
@ -23,6 +23,12 @@ export abstract class UpdateDonation {
|
|||
@IsPositive()
|
||||
donor: number;
|
||||
|
||||
/**
|
||||
* The donation's payed amount in the smalles unit of your currency (default: euro cent).
|
||||
*/
|
||||
@IsInt()
|
||||
payedAmount: number;
|
||||
|
||||
/**
|
||||
* Creates a new Donation entity from this.
|
||||
*/
|
||||
|
|
|
@ -20,6 +20,7 @@ export class UpdateFixedDonation extends UpdateDonation {
|
|||
*/
|
||||
public async update(donation: FixedDonation): Promise<FixedDonation> {
|
||||
donation.amount = this.amount;
|
||||
donation.payedAmount = this.payedAmount;
|
||||
donation.donor = await this.getDonor();
|
||||
|
||||
return donation;
|
||||
|
|
Loading…
Reference in New Issue