attribute seeder
This commit is contained in:
@@ -279,7 +279,7 @@ export class OrderService {
|
||||
}
|
||||
|
||||
async updateStatus(orderId: string, newStatus: OrderStatusEnum) {
|
||||
|
||||
|
||||
const order = await this.findOrderOrFail(orderId)
|
||||
|
||||
order.status = newStatus
|
||||
@@ -344,7 +344,7 @@ export class OrderService {
|
||||
em.persist(order)
|
||||
|
||||
for (const item of items) {
|
||||
const product = products.find(p => Number(p.id) === item.productId)
|
||||
const product = products.find(p => Number(p.id) === Number(item.productId))
|
||||
|
||||
if (!product) {
|
||||
throw new BadRequestException("Product not found!")
|
||||
|
||||
Reference in New Issue
Block a user