forked from UKSOURCE/cms.hailearning.edu.vn
update API Country
This commit is contained in:
@@ -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 gồm cả detailedView
|
||||
return { ...item };
|
||||
});
|
||||
|
||||
// 2. Gắn baseUrl vào ảnh cho danh sách đã lọc
|
||||
|
||||
Reference in New Issue
Block a user