This commit is contained in:
2025-12-15 15:53:41 +03:30
parent 5ef6ee26dd
commit 3fefb02921
3 changed files with 26 additions and 10 deletions
@@ -57,6 +57,19 @@ export class PaymentsController {
findAllByRestaurant(@UserId() userId: string, @RestId() restId: string) {
return this.paymentsService.findAllByRestaurantId(restId, userId);
}
@UseGuards(AuthGuard)
@ApiBearerAuth()
@Get('public/payments/pay-order/:orderId')
@ApiOperation({ summary: 'Pay for an order' })
@ApiParam({ name: 'orderId', type: 'string', description: 'Order ID' })
@ApiHeader({
name: 'X-Slug',
required: true,
})
payAnOrder(@Param('orderId') orderId: string, @RestId() restId: string) {
return this.paymentsService.startPayment(orderId, restId);
}
// @UseGuards(AdminAuthGuard)
// @ApiBearerAuth()
// @Get('admin/payments/:id')