Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnapo committed Jan 8, 2023
1 parent 5ad0796 commit 904c683
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/routes/call-by-meaning-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ router.post("/call", (req, res) => {
return res.status(400).send("Input parameters must have the same length.");
}

return request.post({
uri: "/gbm/search/",
return request.post(`${req.protocol}://${req.get("host")}/gbm/search`, {
form: { inputConcepts, outputConcepts },
}, (err, response, body) => {
if (err) console.error(err);
Expand Down
4 changes: 2 additions & 2 deletions src/routes/get-by-meaning-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ router.post("/search", (req, res) => {
break;
}

request.get(`/gbn/c/${outputConcepts[i]}`, (err2, response, body) => {
request.get(`${req.protocol}://${req.get("host")}/gbn/c/${outputConcepts[i]}`, (err2, response, body) => {
if (response.statusCode !== 200) {
return res.status(418).send(`Could not interpret the concept: ${outputConcepts[i]}`);
}
Expand Down Expand Up @@ -72,7 +72,7 @@ router.post("/search", (req, res) => {
break;
}

request.get(`/gbn/c/${inputConcepts[j]}`, (err3, response2, body2) => {
request.get(`${req.protocol}://${req.get("host")}/gbn/c/${inputConcepts[j]}`, (err3, response2, body2) => {
if (response2.statusCode !== 200) {
return res.status(418).send(`Could not interpret the concept: ${inputConcepts[j]}`);
}
Expand Down

0 comments on commit 904c683

Please # to comment.