update payment

This commit is contained in:
2025-12-02 11:11:36 +03:30
parent 1165167619
commit 2e9a1dc7dc
12 changed files with 250 additions and 61 deletions
@@ -38,15 +38,15 @@ export class PaymentsController {
return this.restaurantPaymentMethodService.findByRestaurant(restId);
}
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
@Post('admin/payments')
@ApiOperation({ summary: 'Create a new payment' })
@ApiBody({ type: CreatePaymentDto })
@ApiCreatedResponse({ description: 'Payment created successfully' })
createPayment(@Body() createPaymentDto: CreatePaymentDto) {
return this.paymentsService.create(createPaymentDto);
}
// @UseGuards(AdminAuthGuard)
// @ApiBearerAuth()
// @Post('admin/payments')
// @ApiOperation({ summary: 'Create a new payment' })
// @ApiBody({ type: CreatePaymentDto })
// @ApiCreatedResponse({ description: 'Payment created successfully' })
// createPayment(@Body() createPaymentDto: CreatePaymentDto) {
// return this.paymentsService.create(createPaymentDto);
// }
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
@@ -56,16 +56,16 @@ export class PaymentsController {
findAllPayments() {
return this.paymentsService.findAll();
}
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
@Get('admin/payments/:id')
@ApiOperation({ summary: 'Get a payment by ID' })
@ApiParam({ name: 'id', type: 'number', description: 'Payment ID' })
@ApiOkResponse({ description: 'Payment found' })
@ApiNotFoundResponse({ description: 'Payment not found' })
findOnePayment(@Param('id') id: string) {
return this.paymentsService.findOne(+id);
}
// @UseGuards(AdminAuthGuard)
// @ApiBearerAuth()
// @Get('admin/payments/:id')
// @ApiOperation({ summary: 'Get a payment by ID' })
// @ApiParam({ name: 'id', type: 'number', description: 'Payment ID' })
// @ApiOkResponse({ description: 'Payment found' })
// @ApiNotFoundResponse({ description: 'Payment not found' })
// findOnePayment(@Param('id') id: string) {
// return this.paymentsService.findById(+id);
// }
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
@Patch('admin/payments/:id')