fo: 강우data promise.all 제거

This commit is contained in:
ljpark
2025-11-18 16:35:28 +09:00
parent 9dfdbe224e
commit 8c40943d9c
@@ -165,14 +165,12 @@ const fetchFacilityPrecipitationList = async (pageNo: number, pageSize: number,
});
const rainDetailListRes: Record<string, any[]> = {};
const promises: Promise<any>[] = [];
const results: any[] = [];
for (let idx = 0; idx < fcltCdList.length; idx += 100) {
const slicedItems = fcltCdList.slice(idx, idx + 100);
// 각 fetch 호출을 Promise 배열에 담기
promises.push(fetchFacilityRainDetailList(searchYear, slicedItems));
const slicedItems = fcltCdList.slice(idx, idx + 100);
const result = await fetchFacilityRainDetailList(searchYear, slicedItems);
results.push(result);
}
// 모든 요청을 병렬로 실행
const results = await Promise.all(promises);
//console.log(results);
// 결과를 합치기
for (const res of results) {