Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
## 2.3.0
ADDED:
- new fields in capabilities for INSPIRE compliance
- openapi: link to swagger definition in swagger ui
- route names are now configurable with env variables: `ROUTE_ROUTE`, `ISOCHRONE_ROUTE` and `NEAREST_ROUTE`

## 2.2.11
UPDATED:
- Updated Dockefile: donwgrade node version to 16 for compatibility with OSRM 5.26.0
- Updated Dockefile: donwgrade node version to 16 for compatibility with OSRM 5.26.0

## 2.2.10
UPDATED:
Expand Down Expand Up @@ -38,7 +40,7 @@ FEAT:
## 2.2.4
FIXED:
- The pg module can emit error event and they were not catched and so it caused some crashs of Road2
- Some orange states were deleted from pgrSource and osrmSource
- Some orange states were deleted from pgrSource and osrmSource

## 2.2.3
FIXED:
Expand Down
16 changes: 10 additions & 6 deletions src/js/apis/simple/1.0.0/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const swaggerUi = require('swagger-ui-express');
var LOGGER = log4js.getLogger("SIMPLE");
var router = express.Router();

var routeNameRoute = process.env.ROUTE_ROUTE || "route";
var routeNameIsochrone = process.env.ISOCHRONE_ROUTE || "isochrone";
var routeNameNearest = process.env.NEAREST_ROUTE || "nearest";

// POST
// ---
// Pour cette API, on va permettre la lecture des requêtes POST en parsant les contenus du type application/json
Expand Down Expand Up @@ -105,11 +109,11 @@ router.all("/getcapabilities", function(req, res) {

// Route
// Pour effectuer un calcul d'itinéraire
router.route("/route")
router.route("/" + routeNameRoute)

.get(async function(req, res, next) {

LOGGER.debug("requete GET sur /simple/1.0.0/route?");
LOGGER.debug("requete GET sur /simple/1.0.0/" + routeNameRoute);
LOGGER.debug(req.originalUrl);

// On récupère l'instance de Service pour faire les calculs
Expand Down Expand Up @@ -184,11 +188,11 @@ router.route("/route")

// Nearest
// Pour trouver les points du graphe les plus proche d'un autre
router.route("/nearest")
router.route("/" + routeNameNearest)

.get(async function(req, res, next) {

LOGGER.debug("requete GET sur /simple/1.0.0/nearest?");
LOGGER.debug("requete GET sur /simple/1.0.0/" + routeNameNearest);
LOGGER.debug(req.originalUrl);

// On récupère l'instance de Service pour faire les calculs
Expand Down Expand Up @@ -264,11 +268,11 @@ router.route("/nearest")
});

/* Génération d'isochrone. */
router.route("/isochrone")
router.route("/" + routeNameIsochrone)

.get(async function(req, res, next) {

LOGGER.debug("requete GET sur /simple/1.0.0/isochrone?");
LOGGER.debug("requete GET sur /simple/1.0.0/" + routeNameIsochrone);
LOGGER.debug(req.originalUrl);

let service = req.app.get("service");
Expand Down
Loading