refactor(config) patch

This commit is contained in:
coderaiser 2016-12-05 15:26:49 +02:00
parent 1c3d7438c1
commit 47ff924184

View file

@ -159,21 +159,20 @@ function patch(req, res, callback) {
};
pullout(req, 'string', function(error, body) {
var data = '',
json = jonny.parse(body) || {};
var json = jonny.parse(body) || {};
if (error)
callback(error);
else
cryptoPass(json);
data = traverse(json);
return callback(error);
cryptoPass(json);
save(function(error) {
if (error)
ponse.sendError(error, options);
else
ponse.send(data, options);
return ponse.sendError(error, options);
var data = traverse(json);
ponse.send(data, options);
});
});
}