diff --git a/BackendJS/BackendTS/routes/navigation.js b/BackendJS/BackendTS/routes/navigation.js index 67b87f3..7ea6df5 100644 --- a/BackendJS/BackendTS/routes/navigation.js +++ b/BackendJS/BackendTS/routes/navigation.js @@ -521,11 +521,11 @@ router.get('/:startX/:startY/:endX/:endY/:type', (req, res) => __awaiter(void 0, //지하철인 경우 else if (element.trafficType === 1) { delete element.lane[0].subwayCityCode; - if (element.lane[0].name === "수도권 분당선(급행)") { - element.lane[0].subwayCode = 10; + if (element.lane[0].name === "수도권 분당선(급행)" || element.lane[0].name === "수도권 분당선") { + element.lane[0].subwayCode = "K1"; } - else if (element.lane[0].name === "수도권 신분당선") { - element.lane[0].subwayCode = 11; + else if (element.lane[0].name === "수도권 신분당선" || element.lane[0].name === "수도권 신분당선(급행)") { + element.lane[0].subwayCode = "D1"; } const getSationInfo = (name, subwayCode) => new Promise((res, rej) => { const SQL = "Select * from subcode_1 where STIN_NM LIKE ? and LN_CD = ?;"; @@ -536,6 +536,14 @@ router.get('/:startX/:startY/:endX/:endY/:type', (req, res) => __awaiter(void 0, return rej(err); } else { + if (results.length === 0) { + return res({ + stCd: null, + lnCd: null, + railCd: null, + stNm: null, + }); + } return res({ stCd: results[0].STIN_CD, lnCd: results[0].LN_CD,