Merge branch 'main' of https://gits.techvanguard.vn/UKSOURCE/cms.hailearning.edu.vn into fix/bao-04022026-service-management

This commit is contained in:
nguyenvanbao
2026-02-04 14:00:14 +07:00
2 changed files with 2 additions and 5 deletions

View File

@@ -504,9 +504,8 @@ exports.apiCountries = async (req, res) => {
// 1. Lọc bỏ 'viewDetail' khỏi từng quốc gia trong danh sách
const filteredCountries = visaData.hero.summaryList.map((item) => {
// Dùng destructuring để tách viewDetail ra và gom phần còn lại vào countryInfo
const { detailedView, ...countryInfo } = item;
return countryInfo;
// Trả về bản sao của item để giữ nguyên cấu trúc gốc bao gm cả detailedView
return { ...item };
});
// 2. Gắn baseUrl vào ảnh cho danh sách đã lọc

View File

@@ -480,8 +480,6 @@ router.get("/visa", ensureAuthenticated, visaController.index);
// Get country data for editing
router.get("/visa/edit/:id", ensureAuthenticated, visaController.getCountry);
router.get("/visa/country", visaController.apiCountries);
// Update hero title
router.post("/visa/update", ensureAuthenticated, visaController.update);