Apply automatic eslint fixes

This commit is contained in:
Daniel García Aubert
2019-10-21 19:07:24 +02:00
parent 593d9e40f6
commit 4d70ac0894
246 changed files with 11782 additions and 11454 deletions
+23 -19
View File
@@ -87,7 +87,7 @@ module.exports = class AnonymousMapController {
checkJsonContentType(),
checkCreateLayergroup(),
prepareAdapterMapConfig(this.mapConfigAdapter),
createLayergroup (
createLayergroup(
this.mapBackend,
this.userLimitsBackend,
this.pgConnection,
@@ -130,7 +130,7 @@ function checkCreateLayergroup () {
}
function prepareAdapterMapConfig (mapConfigAdapter) {
return function prepareAdapterMapConfigMiddleware(req, res, next) {
return function prepareAdapterMapConfigMiddleware (req, res, next) {
const requestMapConfig = req.body;
const { user, api_key } = res.locals;
@@ -155,25 +155,24 @@ function prepareAdapterMapConfig (mapConfigAdapter) {
};
mapConfigAdapter.getMapConfig(user,
requestMapConfig,
params,
context,
(err, requestMapConfig, stats = { overviewsAddedToMapconfig : false }) => {
req.profiler.done('anonymous.getMapConfig');
requestMapConfig,
params,
context,
(err, requestMapConfig, stats = { overviewsAddedToMapconfig: false }) => {
req.profiler.done('anonymous.getMapConfig');
stats.mapType = 'anonymous';
req.profiler.add(stats);
stats.mapType = 'anonymous';
req.profiler.add(stats);
if (err) {
return next(err);
}
if (err) {
return next(err);
}
req.body = requestMapConfig;
res.locals.context = context;
req.body = requestMapConfig;
res.locals.context = context;
next();
});
next();
});
};
}
@@ -186,8 +185,13 @@ function createLayergroup (mapBackend, userLimitsBackend, pgConnection, affected
const { dbuser, dbname, dbpassword, dbhost, dbport } = res.locals;
const params = {
cache_buster, api_key,
dbuser, dbname, dbpassword, dbhost, dbport
cache_buster,
api_key,
dbuser,
dbname,
dbpassword,
dbhost,
dbport
};
const datasource = context.datasource || Datasource.EmptyDatasource();