refactor
This commit is contained in:
@@ -12,8 +12,7 @@ export class PaymentsController {
|
||||
@ApiOperation({ summary: 'Get payments based on filters' })
|
||||
@ApiResponse({ status: 200, description: 'List of payments', type: GetPaymentsOutput })
|
||||
async getPayments(@Query() query: GetPaymentsQuery): Promise<GetPaymentsOutput> {
|
||||
const presenter = await this.paymentsService.getPayments(query);
|
||||
return presenter.viewModel;
|
||||
return this.paymentsService.getPayments(query);
|
||||
}
|
||||
|
||||
@Post()
|
||||
@@ -21,16 +20,14 @@ export class PaymentsController {
|
||||
@ApiOperation({ summary: 'Create a new payment' })
|
||||
@ApiResponse({ status: 201, description: 'Payment created', type: CreatePaymentOutput })
|
||||
async createPayment(@Body() input: CreatePaymentInput): Promise<CreatePaymentOutput> {
|
||||
const presenter = await this.paymentsService.createPayment(input);
|
||||
return presenter.viewModel;
|
||||
return this.paymentsService.createPayment(input);
|
||||
}
|
||||
|
||||
@Patch('status')
|
||||
@ApiOperation({ summary: 'Update the status of a payment' })
|
||||
@ApiResponse({ status: 200, description: 'Payment status updated', type: UpdatePaymentStatusOutput })
|
||||
async updatePaymentStatus(@Body() input: UpdatePaymentStatusInput): Promise<UpdatePaymentStatusOutput> {
|
||||
const presenter = await this.paymentsService.updatePaymentStatus(input);
|
||||
return presenter.viewModel;
|
||||
return this.paymentsService.updatePaymentStatus(input);
|
||||
}
|
||||
|
||||
@Get('membership-fees')
|
||||
|
||||
Reference in New Issue
Block a user