Rename base paths
This commit is contained in:
@@ -53,13 +53,15 @@ function MapController(pgConnection, templateMaps, mapBackend, metadataBackend,
|
||||
module.exports = MapController;
|
||||
|
||||
MapController.prototype.register = function(app) {
|
||||
const { base_url_mapconfig, base_url_templated } = app;
|
||||
const { base_url_mapconfig: mapconfigBasePath, base_url_templated: templateBasePath } = app;
|
||||
const useTemplate = true;
|
||||
|
||||
app.get(base_url_mapconfig, this.composeCreateMapMiddleware());
|
||||
app.post(base_url_mapconfig, this.composeCreateMapMiddleware());
|
||||
app.get(`${base_url_templated}/:template_id/jsonp`, this.composeCreateMapMiddleware(useTemplate));
|
||||
app.post(`${base_url_templated}/:template_id`, this.composeCreateMapMiddleware(useTemplate));
|
||||
app.get(mapconfigBasePath, this.composeCreateMapMiddleware());
|
||||
app.post(mapconfigBasePath, this.composeCreateMapMiddleware());
|
||||
|
||||
app.get(`${templateBasePath}/:template_id/jsonp`, this.composeCreateMapMiddleware(useTemplate));
|
||||
app.post(`${templateBasePath}/:template_id`, this.composeCreateMapMiddleware(useTemplate));
|
||||
|
||||
app.options(app.base_url_mapconfig, cors('Content-Type'));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user