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 cbc5fa2 commit a7e3101
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/src/controllers/order.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const crypto = require('crypto');
const Cart = require("../models/cart.model");
const { isExpired } = require("../utils/checkExpire");
const { Op } = require("sequelize");
const Tour = require("../models/tour.model");

const tmnCode = process.env.vnp_TmnCode;
const secretKey = process.env.vnp_HashSecret;
Expand Down Expand Up @@ -339,7 +340,10 @@ class OrderController {
const user_id = req.params.user_id;

const order = await Order.findAll({
where: { user_id: user_id, status: StatusOrder.COMPLETE }
where: { user_id: user_id, status: StatusOrder.COMPLETE },
include: [
Tour
]
})

if (!order)
Expand Down

0 comments on commit a7e3101

Please sign in to comment.