parent
34dbaaafe0
commit
0636616dad
|
@ -1,4 +1,4 @@
|
|||
import { IsInt, IsPositive } from 'class-validator';
|
||||
import { IsInt, IsOptional, IsPositive } from 'class-validator';
|
||||
import { getConnection } from 'typeorm';
|
||||
import { DonorNotFoundError } from '../../../errors/DonorErrors';
|
||||
import { Donation } from '../../entities/Donation';
|
||||
|
@ -20,7 +20,8 @@ export abstract class CreateDonation {
|
|||
* The donation's payed amount in the smalles unit of your currency (default: euro cent).
|
||||
*/
|
||||
@IsInt()
|
||||
payedAmount: number;
|
||||
@IsOptional()
|
||||
payedAmount?: number;
|
||||
|
||||
/**
|
||||
* Creates a new Donation entity from this.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { IsInt, IsPositive } from 'class-validator';
|
||||
import { IsInt, IsOptional, IsPositive } from 'class-validator';
|
||||
import { getConnection } from 'typeorm';
|
||||
import { DonorNotFoundError } from '../../../errors/DonorErrors';
|
||||
import { Donation } from '../../entities/Donation';
|
||||
|
@ -27,7 +27,8 @@ export abstract class UpdateDonation {
|
|||
* The donation's payed amount in the smalles unit of your currency (default: euro cent).
|
||||
*/
|
||||
@IsInt()
|
||||
payedAmount: number;
|
||||
@IsOptional()
|
||||
payedAmount?: number;
|
||||
|
||||
/**
|
||||
* Creates a new Donation entity from this.
|
||||
|
|
Loading…
Reference in New Issue