Skip to content

Commit

Permalink
Change endpoints for local development in the settings
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatRefrigerator committed Jan 14, 2020
1 parent 0a2753c commit 6e92c80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions app/components/ors-header/ors-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,14 @@ angular.module("orsApp.ors-header", []).component("orsHeader", {
ctrl.presetEndpoints = fill => {
if (fill === "local") {
angular.forEach(Object.keys(ctrl.currentOptions.env), key => {
ctrl.envBase = "http://localhost:8082/openrouteservice-4.5.0";
ctrl.currentOptions.env[key] =
key === "directions"
? ctrl.envBase + "/routes"
: ctrl.envBase + "/" + key; // backend directions endpoint is called routes...
ctrl.envBase = "http://localhost:8082/ors/v2";
ctrl.currentOptions.env[key] = [
"directions",
"matrix",
"isochrones"
].includes(key)
? ctrl.envBase + "/" + key
: "https://api.openrouteservice.org/" + key;
});
} else if (fill === "api") {
angular.forEach(Object.keys(ctrl.currentOptions.env), key => {
Expand Down
2 changes: 1 addition & 1 deletion app/infrastructure/ors-utils-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ angular.module("orsApp.utils-service", []).factory("orsUtilsService", [
"&" + lists.permalinkKeys.routinglang + "=" + userOptions.routinglang;
if (userOptions.units !== undefined)
link += "&" + lists.permalinkKeys.units + "=" + userOptions.units;
// This timeout is neccessariliy needed to update the permalink on router reuse !!!
// This timeout is necessarily needed to update the permalink on router reuse !!!
let skip_segments = [];
if (latLngs) {
for (let idx in waypoints) {
Expand Down

0 comments on commit 6e92c80

Please sign in to comment.