mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
refactor(nestjs): validation schema dtos
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
IPaymentsReceivedFilter,
|
||||
PaymentReceiveMailOptsDTO,
|
||||
} from './types/PaymentReceived.types';
|
||||
import { CreatePaymentReceivedDto, EditPaymentReceivedDto } from './dtos/PaymentReceived.dto';
|
||||
|
||||
@Controller('payments-received')
|
||||
@ApiTags('payments-received')
|
||||
@@ -57,7 +58,7 @@ export class PaymentReceivesController {
|
||||
@Post()
|
||||
@ApiOperation({ summary: 'Create a new payment received.' })
|
||||
public createPaymentReceived(
|
||||
@Body() paymentReceiveDTO: IPaymentReceivedCreateDTO,
|
||||
@Body() paymentReceiveDTO: CreatePaymentReceivedDto,
|
||||
) {
|
||||
return this.paymentReceivesApplication.createPaymentReceived(
|
||||
paymentReceiveDTO,
|
||||
@@ -68,7 +69,7 @@ export class PaymentReceivesController {
|
||||
@ApiOperation({ summary: 'Edit the given payment received.' })
|
||||
public editPaymentReceive(
|
||||
@Param('id', ParseIntPipe) paymentReceiveId: number,
|
||||
@Body() paymentReceiveDTO: IPaymentReceivedEditDTO,
|
||||
@Body() paymentReceiveDTO: EditPaymentReceivedDto,
|
||||
) {
|
||||
return this.paymentReceivesApplication.editPaymentReceive(
|
||||
paymentReceiveId,
|
||||
|
||||
Reference in New Issue
Block a user