Use req2params middleware for datavie search endpoint
This commit is contained in:
@@ -118,6 +118,7 @@ LayergroupController.prototype.register = function(app) {
|
||||
cors(),
|
||||
userMiddleware,
|
||||
allowQueryParams(allowedDataviewQueryParams),
|
||||
this.req2paramsMiddleware,
|
||||
this.dataviewSearch.bind(this)
|
||||
);
|
||||
|
||||
@@ -126,11 +127,11 @@ LayergroupController.prototype.register = function(app) {
|
||||
cors(),
|
||||
userMiddleware,
|
||||
allowQueryParams(allowedDataviewQueryParams),
|
||||
this.req2paramsMiddleware,
|
||||
this.dataviewSearch.bind(this)
|
||||
);
|
||||
|
||||
app.get(app.base_url_mapconfig +
|
||||
'/:token/analysis/node/:nodeId',
|
||||
app.get(app.base_url_mapconfig + '/:token/analysis/node/:nodeId',
|
||||
cors(),
|
||||
userMiddleware,
|
||||
this.req2paramsMiddleware,
|
||||
@@ -194,12 +195,7 @@ LayergroupController.prototype.dataviewSearch = function(req, res, next) {
|
||||
var self = this;
|
||||
|
||||
step(
|
||||
function setupParams() {
|
||||
self.req2params(req, res, this);
|
||||
},
|
||||
function searchDataview(err) {
|
||||
assert.ifError(err);
|
||||
|
||||
function searchDataview() {
|
||||
var mapConfigProvider = new MapStoreMapConfigProvider(
|
||||
self.mapStore, req.context.user, self.userLimitsApi, req.params
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user