Do not proxy create and intantiate middlewares
This commit is contained in:
parent
eb5bf52bd9
commit
d2b5eaa8c3
@ -59,7 +59,7 @@ MapController.prototype.register = function(app) {
|
||||
createGetPrepareConfig,
|
||||
this.prepareAdapterMapConfig.bind(this),
|
||||
this.createLayergroup.bind(this),
|
||||
this.createGet.bind(this),
|
||||
this.create.bind(this),
|
||||
respond,
|
||||
mapErrorMiddleware({
|
||||
label: 'ANONYMOUS LAYERGROUP',
|
||||
@ -74,7 +74,7 @@ MapController.prototype.register = function(app) {
|
||||
createPostPrepareConfig,
|
||||
this.prepareAdapterMapConfig.bind(this),
|
||||
this.createLayergroup.bind(this),
|
||||
this.createPost.bind(this),
|
||||
this.create.bind(this),
|
||||
respond,
|
||||
mapErrorMiddleware({
|
||||
label: 'ANONYMOUS LAYERGROUP',
|
||||
@ -89,7 +89,7 @@ MapController.prototype.register = function(app) {
|
||||
prepareJsonTemplateParams,
|
||||
this.getTemplate.bind(this),
|
||||
this.createLayergroupFromTemplate.bind(this),
|
||||
this.jsonp.bind(this),
|
||||
this.instantiateTemplate.bind(this),
|
||||
respond,
|
||||
mapErrorMiddleware({
|
||||
label: 'NAMED MAP LAYERGROUP'
|
||||
@ -103,7 +103,7 @@ MapController.prototype.register = function(app) {
|
||||
prepareTemplateParams,
|
||||
this.getTemplate.bind(this),
|
||||
this.createLayergroupFromTemplate.bind(this),
|
||||
this.instantiate.bind(this),
|
||||
this.instantiateTemplate.bind(this),
|
||||
respond,
|
||||
mapErrorMiddleware({
|
||||
label: 'NAMED MAP LAYERGROUP'
|
||||
@ -170,22 +170,6 @@ function prepareJsonTemplateParams(req, res, next) {
|
||||
return next();
|
||||
}
|
||||
|
||||
MapController.prototype.createGet = function(req, res, next){
|
||||
this.create(req, res, next);
|
||||
};
|
||||
|
||||
MapController.prototype.createPost = function(req, res, next) {
|
||||
this.create(req, res, next);
|
||||
};
|
||||
|
||||
MapController.prototype.instantiate = function(req, res, next) {
|
||||
this.instantiateTemplate(req, res, next);
|
||||
};
|
||||
|
||||
MapController.prototype.jsonp = function(req, res, next) {
|
||||
this.instantiateTemplate(req, res, next);
|
||||
};
|
||||
|
||||
MapController.prototype.prepareAdapterMapConfig = function (req, res, next) {
|
||||
const requestMapConfig = req.body;
|
||||
const { user, dbhost, dbport, dbname, dbuser, dbpassword, api_key } = res.locals;
|
||||
|
Loading…
Reference in New Issue
Block a user