This commit is contained in:
2025-12-21 22:35:38 +01:00
parent 3c64f328e2
commit 9bd2e630e6
38 changed files with 736 additions and 684 deletions

View File

@@ -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')