Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hdddhdd committed Nov 11, 2023
2 parents 5a2ec19 + 243aaa9 commit 2dd7f73
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 165 deletions.
36 changes: 0 additions & 36 deletions api/convertAddress/address2grid.py

This file was deleted.

24 changes: 0 additions & 24 deletions api/convertAddress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,6 @@ module.exports = async function (context, req) {
}
};

async function convertAddressToCoordinates(address) {
const call_command = `python ./convertAddress/address2grid.py ${address}`;
// console.log(call_command);

const execSync = require('child_process').execSync;
const resultBuffer = execSync(call_command, { encoding: 'utf-8' });
const result = resultBuffer.toString();

var jsonData = ""
try {
jsonData = JSON.parse(result);
// console.log(jsonData);
} catch (error) {
console.error('JSON 파싱 오류:', error.message);
}

context.res.json({
// status: 200, /* Defaults to 200 */
address: jsonData.address,
lon: jsonData.lon,
lan: jsonData.lan
});
}

async function getTransitFare(coordinates) {
const apiUrl = "https://apis.openapi.sk.com/transit/routes";
const payload = {
Expand Down
115 changes: 11 additions & 104 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"dependencies": {
"axios": "^1.6.1",
"swa": "^0.0.8"
"swa": "^0.0.1"
}
}

0 comments on commit 2dd7f73

Please sign in to comment.