This commit is contained in:
2025-12-06 10:53:16 +03:30
parent 2f35cbad73
commit 297e23e164
+8 -4
View File
@@ -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);