Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DucHuy2801 committed May 8, 2024
1 parent a7e3101 commit 21888ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/src/controllers/order.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ class OrderController {

tour.current_customers += (order_item.adult_quantity + order_item.child_quantity);
await tour.save();

await OrderTour.create({
order_id: new_order.order_id,
tour_id: order_item.tour_id
})
}
new_order.total = total_price;
new_order.total_to_pay = total_price;
Expand Down Expand Up @@ -342,7 +347,7 @@ class OrderController {
const order = await Order.findAll({
where: { user_id: user_id, status: StatusOrder.COMPLETE },
include: [
Tour
Tour, OrderItem
]
})

Expand Down

0 comments on commit 21888ea

Please sign in to comment.