feat(pos): update createOrder method to accept posId and retrieve inventoryId
This commit is contained in:
@@ -33,10 +33,8 @@ export class PosController {
|
||||
return this.posService.getProductCategories(Number(posId))
|
||||
}
|
||||
|
||||
@Post('/orders/create')
|
||||
async createOrder(@Body() dto: CreateOrderDto) {
|
||||
const inventoryId = await this.posService.getDefaultInventoryId()
|
||||
|
||||
return this.posService.createOrder(dto, inventoryId!)
|
||||
@Post('/:posId/orders/create')
|
||||
async createOrder(@Param('posId') posId: string, @Body() dto: CreateOrderDto) {
|
||||
return this.posService.createOrder(Number(posId), dto)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user