update API Country

This commit is contained in:
r2xrzh9q2z-lab
2026-02-04 13:57:23 +07:00
parent 85f6295824
commit 8d38b6db56
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