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) @UseGuards(AuthGuard)
@ApiBearerAuth() @ApiBearerAuth()
@Get('public/orders/:id') @ApiOperation({ summary: 'Get an order By id for User' })
findOne(@Param('id') id: string) { @ApiParam({ name: 'orderId', description: 'Order ID' })
return this.ordersService.findOne(id); @Get('public/orders/:orderId')
findOne(@Param('orderId') orderId: string) {
return this.ordersService.findOne(orderId);
} }
@UseGuards(AuthGuard) @UseGuards(AuthGuard)
@ApiBearerAuth() @ApiBearerAuth()
@Patch('public/orders/:id/cancel') @Patch('public/orders/:id/cancel')
@ApiOperation({ summary: 'Cancel an order By User' })
@ApiParam({ name: 'id', description: 'Order ID' })
cancelOrder(@Param('id') id: string) { cancelOrder(@Param('id') id: string) {
return this.ordersService.cancelOrder(id); return this.ordersService.cancelOrder(id);
} }
@@ -71,7 +75,7 @@ export class OrdersController {
@UseGuards(AdminAuthGuard) @UseGuards(AdminAuthGuard)
@ApiBearerAuth() @ApiBearerAuth()
@Patch('admin/orders/:orderId/ready') @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' }) @ApiParam({ name: 'orderId', description: 'Order ID' })
readyForPickup(@Param('orderId') orderId: string) { readyForPickup(@Param('orderId') orderId: string) {
return this.ordersService.readyForDelivery(orderId); return this.ordersService.readyForDelivery(orderId);