refactor step 2

This commit is contained in:
2025-12-15 12:35:29 +03:30
parent b776f2b83a
commit 184ceb4800
10 changed files with 111 additions and 182 deletions
@@ -6,6 +6,7 @@ import { UserId } from '../../../common/decorators/user-id.decorator';
import { RestId } from 'src/common/decorators/rest-id.decorator';
import { AdminAuthGuard } from '../../auth/guards/adminAuth.guard';
import { FindOrdersDto } from '../dto/find-orders.dto';
import { OrderStatus } from '../interface/order-status';
@ApiTags('orders')
@Controller()
@@ -148,16 +149,9 @@ export class OrdersController {
@ApiParam({
name: 'status',
description: 'Order status',
enum: [
'readyForCustomerPickup',
'readyForDineIn',
'readyForDeliveryCar',
'readyForDeliveryCourier',
'shipping',
'delivered',
],
enum: OrderStatus,
})
updateStatus(@Param('orderId') orderId: string, @Param('status') status: string, @RestId() restId: string) {
updateStatus(@Param('orderId') orderId: string, @Param('status') status: OrderStatus, @RestId() restId: string) {
return this.ordersService.updateStatus(orderId, status, restId);
}
}