Skip to content

Commit

Permalink
Feature/backend (#206)
Browse files Browse the repository at this point in the history
* Modify: CI/CD 수정

* Feat: navigation API 개발 완료

* Modify: navigation API 수정

* Fix: navigation API 예외처리

* Feat: CORS http 포트 추가

* Modify: CORS 옵션 수정

* Modify: CORS 옵션 수정

* Feat: https 서버 업데이트

* HTTPS 적용

* Feat: COSR 옵션 https 추가

* Feat: 없는 지하철역 예외처리

* Feat: 없는 지하철역 예외처리

* Modify: 예외처리 진행

* Modify: https 서버 수정

* Feat: 길찾기 기능 가중치 추가

* Feat: 길찾기 필요 정보 추가, 인터페이스 수정

* Feat: CI/CD 수정

* Modify: 교통약자 도우미번호 추가
  • Loading branch information
sw0501 authored Dec 7, 2023
1 parent edff6da commit 634609f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions BackendJS/BackendTS/routes/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,6 @@ router.get('/:startX/:startY/:endX/:endY/:type', (req, res) => __awaiter(void 0,
element.passStopList.stations[element.passStopList.stations.length - 1].stCd = endInfo.stCd;
element.passStopList.stations[element.passStopList.stations.length - 1].lnCd = endInfo.lnCd;
element.passStopList.stations[element.passStopList.stations.length - 1].railCd = endInfo.railCd;
console.log(element.passStopList.stations[0]);
console.log(element.passStopList.stations[element.passStopList.stations.length - 1]);
}
}));
}));
Expand Down
5 changes: 3 additions & 2 deletions BackendJS/BackendTS/routes/subwaydata.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function getSubwayStationName(stNm, callback) {
function getSubwayStationInfo(stCd, stNm, callback) {
try {
const connection = db.return_connection();
let sql = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.stin_cd = ? and a.stin_nm = ?";
let sql = "Select RAIL_OPR_ISTT_CD, LN_CD, STIN_CD, STIN_NM, `교통약자도우미 전화번호` as wNum, en_name, f_code FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.stin_cd = ? and a.stin_nm = ?";
connection.query(sql, [stCd, stNm], function (err, results, fields) {
if (err) {
console.log(err);
Expand Down Expand Up @@ -99,6 +99,7 @@ function getSubwayStationInfo(stCd, stNm, callback) {
if (stationinfo === undefined) {
return callback(null);
}
console.log(results[0]);
callback({
railCd: stationinfo.railOprIsttCd,
lnCd: stationinfo.lnCd,
Expand All @@ -107,7 +108,7 @@ function getSubwayStationInfo(stCd, stNm, callback) {
roadNm: stationinfo.roadNmAdr,
tmX: stationinfo.stinLocLon,
tmY: stationinfo.stinLocLat,
wNum: results[0].wnum,
wNum: results[0].wNum,
eName: results[0].en_name,
fCode: results[0].f_code
});
Expand Down
4 changes: 2 additions & 2 deletions BackendTS/routes/subwaydata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function getSubwayStationInfo(stCd:string, stNm:string, callback:(stationInfo:Su

const connection:mysql.connection = db.return_connection();

let sql:string = "Select * FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.stin_cd = ? and a.stin_nm = ?";
let sql:string = "Select RAIL_OPR_ISTT_CD, LN_CD, STIN_CD, STIN_NM, `교통약자도우미 전화번호` as wNum, en_name, f_code FROM subcode_1 a, 도우미번호 b WHERE (a.stin_nm = b.역명 and a.ln_cd = b.운영노선명) and a.stin_cd = ? and a.stin_nm = ?";

connection.query(sql, [stCd, stNm], function (err:Error, results:any, fields:any) {
if (err) {
Expand Down Expand Up @@ -95,7 +95,7 @@ function getSubwayStationInfo(stCd:string, stNm:string, callback:(stationInfo:Su
roadNm: stationinfo.roadNmAdr,
tmX: stationinfo.stinLocLon,
tmY: stationinfo.stinLocLat,
wNum: results[0].wnum,
wNum: results[0].wNum,
eName: results[0].en_name,
fCode: results[0].f_code
});
Expand Down

0 comments on commit 634609f

Please sign in to comment.