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
@@ -19,7 +19,7 @@ module.exports = class AdminTemplateController {
}
route (templateRouter) {
templateRouter.options(`/:template_id`);
templateRouter.options('/:template_id');
templateRouter.post('/', this.middlewares({
action: 'create',
@@ -106,7 +106,7 @@ module.exports = class NamedMapController {
lastModifiedHeader(),
lastUpdatedTimeLayergroup(),
layerStats(this.pgConnection, this.statsBackend),
layergroupIdHeader(this.templateMaps ,useTemplateHash),
layergroupIdHeader(this.templateMaps, useTemplateHash),
layergroupMetadata(this.layergroupMetadata, includeQuery),
mapError({ label, addContext })
];
@@ -114,7 +114,7 @@ module.exports = class NamedMapController {
};
function checkInstantiteLayergroup () {
return function checkInstantiteLayergroupMiddleware(req, res, next) {
return function checkInstantiteLayergroupMiddleware (req, res, next) {
if (req.method === 'GET') {
const { callback, config } = req.query;
@@ -125,7 +125,7 @@ function checkInstantiteLayergroup () {
if (config) {
try {
req.body = JSON.parse(config);
} catch(e) {
} catch (e) {
return next(new Error('Invalid config parameter, should be a valid JSON'));
}
}
+1 -1
View File
@@ -21,7 +21,7 @@ module.exports = class TemplateRouter {
authBackend,
layergroupMetadata,
namedMapProviderCache,
tileBackend,
tileBackend
} = collaborators;
this.namedMapController = new NamedMapController(
+1 -1
View File
@@ -89,7 +89,7 @@ function getTile ({ tileBackend, label }) {
}
function setContentTypeHeader () {
return function setContentTypeHeaderMiddleware(req, res, next) {
return function setContentTypeHeaderMiddleware (req, res, next) {
res.set('Content-Type', res.get('content-type') || res.get('Content-Type') || 'image/png');
next();