refactor step 2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user