From cc3192e3eecfa80bc8718f11852efb5e7a41fa67 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Sat, 20 Dec 2025 11:50:58 +0330 Subject: [PATCH] fix change status bug --- src/modules/orders/controllers/orders.controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/orders/controllers/orders.controller.ts b/src/modules/orders/controllers/orders.controller.ts index 797584d..b69f374 100644 --- a/src/modules/orders/controllers/orders.controller.ts +++ b/src/modules/orders/controllers/orders.controller.ts @@ -58,7 +58,7 @@ export class OrdersController { @Param('status') status: OrderStatus, @RestId() restId: string, ) { - return this.ordersService.changeOrderStatus(orderId, restId, status, 'user', dto.desc); + return this.ordersService.changeOrderStatus(orderId, restId, status, 'user', dto?.desc); } /******************** Admin Routes **********************/ @@ -93,7 +93,7 @@ export class OrdersController { @Param('status') status: OrderStatus, @RestId() restId: string, ) { - return this.ordersService.changeOrderStatus(orderId, restId, status, 'admin', dto.desc); + return this.ordersService.changeOrderStatus(orderId, restId, status, 'admin', dto?.desc); } // @UseGuards(AdminAuthGuard)