order
This commit is contained in:
@@ -9,6 +9,7 @@ import { OrderStatus } from '../interface/order.interface';
|
||||
import { UpdateOrderStatusDto } from '../dto/update-order-status.dto';
|
||||
import { Permissions } from 'src/common/decorators/permissions.decorator';
|
||||
import { Permission } from 'src/common/enums/permission.enum';
|
||||
import { CreateOrderDto } from '../dto/create-order.dto';
|
||||
|
||||
@ApiTags('orders')
|
||||
@ApiBearerAuth()
|
||||
@@ -16,13 +17,13 @@ import { Permission } from 'src/common/enums/permission.enum';
|
||||
export class OrdersController {
|
||||
constructor(private readonly ordersService: OrdersService) { }
|
||||
|
||||
@Post('public/checkout')
|
||||
// @UseGuards(AuthGuard)
|
||||
// @Post('public/checkout')
|
||||
|
||||
// @ApiOperation({ summary: 'Checkout : create order and payment record' })
|
||||
// checkout(@UserId() userId: string,) {
|
||||
// return this.ordersService.checkout(userId);
|
||||
// }
|
||||
@ApiOperation({ summary: 'Checkout : create order ' })
|
||||
@ApiBody({ type: CreateOrderDto })
|
||||
checkout(@UserId() userId: string, @Body() body: CreateOrderDto) {
|
||||
return this.ordersService.createOrder(userId, body);
|
||||
}
|
||||
|
||||
// @UseGuards(AuthGuard)
|
||||
// @Get('public/orders')
|
||||
|
||||
Reference in New Issue
Block a user