order
This commit is contained in:
@@ -30,14 +30,18 @@ export class OrdersController {
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@Get('public/orders/:id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.ordersService.findOne(id);
|
||||
@ApiOperation({ summary: 'Get an order By id for User' })
|
||||
@ApiParam({ name: 'orderId', description: 'Order ID' })
|
||||
@Get('public/orders/:orderId')
|
||||
findOne(@Param('orderId') orderId: string) {
|
||||
return this.ordersService.findOne(orderId);
|
||||
}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@Patch('public/orders/:id/cancel')
|
||||
@ApiOperation({ summary: 'Cancel an order By User' })
|
||||
@ApiParam({ name: 'id', description: 'Order ID' })
|
||||
cancelOrder(@Param('id') id: string) {
|
||||
return this.ordersService.cancelOrder(id);
|
||||
}
|
||||
@@ -71,7 +75,7 @@ export class OrdersController {
|
||||
@UseGuards(AdminAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@Patch('admin/orders/:orderId/ready')
|
||||
@ApiOperation({ summary: 'Ready for pickup an order' })
|
||||
@ApiOperation({ summary: 'Ready for pickup or delivery ' })
|
||||
@ApiParam({ name: 'orderId', description: 'Order ID' })
|
||||
readyForPickup(@Param('orderId') orderId: string) {
|
||||
return this.ordersService.readyForDelivery(orderId);
|
||||
|
||||
Reference in New Issue
Block a user