awscredentials is now POST

This commit is contained in:
Girish Ramakrishnan
2015-09-08 21:01:04 -07:00
parent 658af3edcf
commit 6e6d8c0bc5
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ function getAWSCredentials(callback) {
// CaaS
if (config.token()) {
var url = config.apiServerOrigin() + '/api/v1/boxes/' + config.fqdn() + '/awscredentials';
superagent.get(url).query({ token: config.token() }).end(function (error, result) {
superagent.post(url).query({ token: config.token() }).end(function (error, result) {
if (error) return callback(error);
if (result.statusCode !== 201) return callback(new Error(result.text));
if (!result.body || !result.body.credentials) return callback(new Error('Unexpected response'));