fix: lỗi bong bóng Tour vẫn hiển thị sau khi xóa

This commit is contained in:
2026-06-17 17:15:11 +07:00
parent 4d63bff214
commit 05dc80bb6d
4 changed files with 8 additions and 4 deletions
+3 -1
View File
@@ -308,7 +308,7 @@ class TourController {
@Post()
async createTour(@Body() body: any, @Req() req: any) {
const { title, description, startDate, endDate, adultCount, childCount, childDiscount, tags } = body;
return this.prisma.tour.create({
const tour = await this.prisma.tour.create({
data: {
title,
description,
@@ -338,6 +338,8 @@ class TourController {
}
}
});
await this.cacheManager.del(`/api/v1/tours/explore`);
return tour;
}
@Roles(ParticipantRole.OWNER, ParticipantRole.MANAGER, ParticipantRole.MEMBER) // Allow members to add locations