Skip to content

Commit

Permalink
delete cache when update tour
Browse files Browse the repository at this point in the history
  • Loading branch information
DucHuy2801 committed May 7, 2024
1 parent bf92402 commit 68c9c45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/src/controllers/tour.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class TourController {
}

// Deleted cached data from Redis
redisClient.del("tours")
redisClient.del("online_tours")

return res.status(200).json({
message: "Update tour successfully!",
Expand Down Expand Up @@ -657,7 +657,6 @@ class TourController {

const tour = await findTourById(tour_id)
if (!tour) return res.status(404).json({ message: "Not found status!" })
console.log("status:::", status)
switch(status) {
case "reject":
tour.status = StatusTour.REJECT
Expand Down

0 comments on commit 68c9c45

Please sign in to comment.