Better naming

This commit is contained in:
Raul Ochoa 2016-04-13 19:15:06 +02:00
parent 7a87b8ebef
commit 28400f4544

View File

@ -118,13 +118,13 @@ LayergroupController.prototype.dataview = function(req, res) {
);
self.dataviewBackend.getDataview(mapConfigProvider, req.context.user, req.params, this);
},
function finish(err, tile, stats) {
function finish(err, dataview, stats) {
req.profiler.add(stats || {});
if (err) {
self.sendError(req, res, err, 'GET DATAVIEW');
} else {
self.sendResponse(req, res, tile, 200);
self.sendResponse(req, res, dataview, 200);
}
}
);
@ -146,13 +146,13 @@ LayergroupController.prototype.dataviewSearch = function(req, res) {
);
self.dataviewBackend.search(mapConfigProvider, req.context.user, req.params, this);
},
function finish(err, tile, stats) {
function finish(err, searchResult, stats) {
req.profiler.add(stats || {});
if (err) {
self.sendError(req, res, err, 'GET DATAVIEW SEARCH');
} else {
self.sendResponse(req, res, tile, 200);
self.sendResponse(req, res, searchResult, 200);
}
}
);
@ -174,13 +174,13 @@ LayergroupController.prototype.widget = function(req, res) {
);
self.widgetBackend.getWidget(mapConfigProvider, req.params, this);
},
function finish(err, tile, stats) {
function finish(err, widget, stats) {
req.profiler.add(stats || {});
if (err) {
self.sendError(req, res, err, 'GET WIDGET');
} else {
self.sendResponse(req, res, tile, 200);
self.sendResponse(req, res, widget, 200);
}
}
);
@ -202,13 +202,13 @@ LayergroupController.prototype.widgetSearch = function(req, res) {
);
self.widgetBackend.search(mapConfigProvider, req.params, this);
},
function finish(err, tile, stats) {
function finish(err, searchResult, stats) {
req.profiler.add(stats || {});
if (err) {
self.sendError(req, res, err, 'GET WIDGET');
} else {
self.sendResponse(req, res, tile, 200);
self.sendResponse(req, res, searchResult, 200);
}
}
);