Return a dataview/widget from response body

This commit is contained in:
Raul Ochoa 2016-05-31 18:20:16 +02:00
parent 5b76ec9f68
commit cd7adbd792

View File

@ -123,7 +123,11 @@ TestClient.prototype.getWidget = function(widgetName, params, callback) {
function finish(err, res) {
self.keysToDelete['map_cfg|' + LayergroupToken.parse(layergroupId).token] = 0;
self.keysToDelete['user:localhost:mapviews:global'] = 5;
return callback(err, res);
var widget;
if (!err && res.body) {
widget = JSON.parse(res.body);
}
return callback(err, res, widget);
}
);
};