Pass only needed params to attributes backend backend

This commit is contained in:
Daniel García Aubert
2018-03-22 18:16:41 +01:00
parent 81706b8726
commit d3cbd70054
+9 -1
View File
@@ -504,7 +504,15 @@ function getFeatureAttributes (attributesBackend) {
req.profiler.start('windshaft.maplayer_attribute');
const { mapConfigProvider } = res.locals;
const params = getRequestParams(res.locals);
const { token } = res.locals;
const { dbuser, dbname, dbpassword, dbhost, dbport } = res.locals;
const { layer, fid } = req.params;
const params = {
token,
dbuser, dbname, dbpassword, dbhost, dbport,
layer, fid
};
attributesBackend.getFeatureAttributes(mapConfigProvider, params, false, (err, tile, stats = {}) => {
req.profiler.add(stats);