Skip to content

Commit

Permalink
index html line 261~
Browse files Browse the repository at this point in the history
  • Loading branch information
kkyh12180 committed Nov 12, 2023
1 parent 2602f2d commit 2c9cf92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/findroad/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ module.exports = async function (context, req) {
console.log(`야삐 Arrival Station: ${arrival_station}`);
// console.log(`야삐 Route: ${route}`);
if (text_counter == 0) {
itineraryText += `{"dep": ${departure_station},`;
itineraryText += `"arr": ${arrival_station},}`;
itineraryText += `{"dep": "${departure_station}",`;
itineraryText += `"arr": "${arrival_station}"}`;
// itineraryText += `"Route": '${route}',}`;

text_counter += 1;
Expand All @@ -65,7 +65,7 @@ module.exports = async function (context, req) {
}
}
console.log(itineraryText)
context.res.body = JSON.parse(itineraryText);
// context.res.body = JSON.parse(itineraryText);

context.res = {
status: 200,
Expand Down
4 changes: 3 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ <h1>Vanilla JavaScript App</h1>
}),
})
).json();
console.log(text.body);

// 문제의 구간
console.log(typeof text);
document.querySelector('#findroad').textContent = text;

} catch (error) {
Expand Down

0 comments on commit 2c9cf92

Please sign in to comment.