Rename response middleware

This commit is contained in:
Daniel García Aubert 2017-11-02 18:39:46 +01:00
parent 08b91f935d
commit 3e7106002d

View File

@ -60,7 +60,7 @@ MapController.prototype.register = function(app) {
this.afterLayergroupCreateBuilder({ this.afterLayergroupCreateBuilder({
includeQuery: true includeQuery: true
}), }),
respond, sendResponse,
augmentError({ augmentError({
label: 'ANONYMOUS LAYERGROUP', label: 'ANONYMOUS LAYERGROUP',
addContext: true addContext: true
@ -77,7 +77,7 @@ MapController.prototype.register = function(app) {
this.afterLayergroupCreateBuilder({ this.afterLayergroupCreateBuilder({
includeQuery: true includeQuery: true
}), }),
respond, sendResponse,
augmentError({ augmentError({
label: 'ANONYMOUS LAYERGROUP', label: 'ANONYMOUS LAYERGROUP',
addContext: true addContext: true
@ -94,7 +94,7 @@ MapController.prototype.register = function(app) {
this.afterLayergroupCreateBuilder({ this.afterLayergroupCreateBuilder({
useTemplateHash: true useTemplateHash: true
}), }),
respond, sendResponse,
augmentError({ augmentError({
label: 'NAMED MAP LAYERGROUP' label: 'NAMED MAP LAYERGROUP'
}) })
@ -110,7 +110,7 @@ MapController.prototype.register = function(app) {
this.afterLayergroupCreateBuilder({ this.afterLayergroupCreateBuilder({
useTemplateHash: true useTemplateHash: true
}), }),
respond, sendResponse,
augmentError({ augmentError({
label: 'NAMED MAP LAYERGROUP' label: 'NAMED MAP LAYERGROUP'
}) })
@ -284,7 +284,7 @@ MapController.prototype.instantiateLayergroup = function(req, res, next) {
}); });
}; };
function respond (req, res) { function sendResponse (req, res) {
const { layergroup } = res.locals; const { layergroup } = res.locals;
res.status(200); res.status(200);