diff --git a/src/modules/orders/orders.controller.ts b/src/modules/orders/orders.controller.ts index 42f7fb1..5845a1d 100644 --- a/src/modules/orders/orders.controller.ts +++ b/src/modules/orders/orders.controller.ts @@ -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);