update payment
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user