awscredentials is now POST
This commit is contained in:
+1
-1
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user