Skip to content

Commit

Permalink
🎨 style: μ½”λ“œ μˆœμ„œ λ³€κ²½#54
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuo3o committed Nov 13, 2024
1 parent 5989e08 commit b0b6d8d
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions BE/src/stock/detail/stock-detail.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,38 @@ export class StockDetailService {
}
}

/**
* @private APIμ—μ„œ 받은 κ΅­λ‚΄μ£Όμ‹κΈ°κ°„λ³„μ‹œμ„Έ(일/μ£Ό/μ›”/λ…„) 데이터λ₯Ό ν•„μš”ν•œ μ •λ³΄λ‘œ μ •μ œν•˜λŠ” ν•¨μˆ˜
* @param {InquirePriceApiResponse} response - API μ‘λ‹΅μ—μ„œ 받은 μ›μ‹œ 데이터
* @returns - ν•„μš”ν•œ μ •λ³΄λ§Œ μΆ”μΆœν•œ 데이터 λ°°μ—΄
*
* @author uuuo3o
*/
private formatStockInquirePriceData(response: InquirePriceApiResponse) {
const { output2 } = response;

return output2.map((info) => {
const stockData = new InquirePriceChartDataDto();
const {
stck_bsop_date,
stck_clpr,
stck_oprc,
stck_hgpr,
stck_lwpr,
acml_vol,
} = info;

stockData.stck_bsop_date = stck_bsop_date;
stockData.stck_clpr = stck_clpr;
stockData.stck_oprc = stck_oprc;
stockData.stck_hgpr = stck_hgpr;
stockData.stck_lwpr = stck_lwpr;
stockData.acml_vol = acml_vol;

return stockData;
});
}

/**
* @private ν•œκ΅­νˆ¬μž Open API - API 호좜용 곡톡 ν•¨μˆ˜
* @param {string} trId - API ν˜ΈμΆœμ— μ‚¬μš©ν•  tr_id
Expand Down Expand Up @@ -93,36 +125,4 @@ export class StockDetailService {
throw error;
}
}

/**
* @private APIμ—μ„œ 받은 κ΅­λ‚΄μ£Όμ‹κΈ°κ°„λ³„μ‹œμ„Έ(일/μ£Ό/μ›”/λ…„) 데이터λ₯Ό ν•„μš”ν•œ μ •λ³΄λ‘œ μ •μ œν•˜λŠ” ν•¨μˆ˜
* @param {InquirePriceApiResponse} response - API μ‘λ‹΅μ—μ„œ 받은 μ›μ‹œ 데이터
* @returns - ν•„μš”ν•œ μ •λ³΄λ§Œ μΆ”μΆœν•œ 데이터 λ°°μ—΄
*
* @author uuuo3o
*/
private formatStockInquirePriceData(response: InquirePriceApiResponse) {
const { output2 } = response;

return output2.map((info) => {
const stockData = new InquirePriceChartDataDto();
const {
stck_bsop_date,
stck_clpr,
stck_oprc,
stck_hgpr,
stck_lwpr,
acml_vol,
} = info;

stockData.stck_bsop_date = stck_bsop_date;
stockData.stck_clpr = stck_clpr;
stockData.stck_oprc = stck_oprc;
stockData.stck_hgpr = stck_hgpr;
stockData.stck_lwpr = stck_lwpr;
stockData.acml_vol = acml_vol;

return stockData;
});
}
}

0 comments on commit b0b6d8d

Please sign in to comment.