Just pass the req.body through

The metadata has things like restoreUrl and restoreKey which should not be
passed through anyways
This commit is contained in:
Girish Ramakrishnan
2015-08-27 18:49:52 -07:00
parent c90e0fd21e
commit c2a43b69a9

View File

@@ -58,21 +58,11 @@ function update(req, res, next) {
debug('provision: received from box %j', req.body);
superagent.get('http://169.254.169.254/metadata/v1.json').end(function (error, result) {
if (error || result.statusCode !== 200) {
console.error('Error getting metadata', error);
return;
}
var userData = JSON.parse(result.body.user_data);
userData.sourceTarballUrl = req.body.sourceTarballUrl;
installer.provision(userData, function (error) {
if (error) console.error(error);
});
next(new HttpSuccess(202, { }));
installer.provision(req.body, function (error) {
if (error) console.error(error);
});
next(new HttpSuccess(202, { }));
}
function retire(req, res, next) {