lodash map 함수 사용하여 내부에서 데이터 조회시 response 데이터 빈배열로 반환(DB에 데이터가 있음에도)
const rsltList: object[] = [] _.map(idList, async(id) => { const result = await getResult(id) rsltList.push(result) }) response(res, rsltList)
map 함수의 비동기 처리
map 함수 대신 for await 사용
const rsltList: object[] = [] for await (const id of idList) { const result = await getResult(id) rsltList.push(result) }) response(res, rsltList)
for await 대체 후 해당 부분 문제있던 API 테스트 진행,
데이터 리스트 넘어오는 결과 값 확인함