Fix api use
This commit is contained in:
parent
b39e1850d7
commit
c2419ba46c
|
@ -251,9 +251,9 @@ return done();
|
||||||
if (error) return done(error);
|
if (error) return done(error);
|
||||||
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
|
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
|
||||||
|
|
||||||
token = result.body.token;
|
token = result.body.accessToken;
|
||||||
|
|
||||||
superagent.get('https://' + inspect.apiEndpoint + '/api/v1/profile')
|
superagent.get('https://' + inspect.apiEndpoint + '/api/v1/user/profile')
|
||||||
.query({ access_token: token }).end(function (error, result) {
|
.query({ access_token: token }).end(function (error, result) {
|
||||||
if (error) return done(error);
|
if (error) return done(error);
|
||||||
if (result.statusCode !== 200) return done(new Error('Get profile failed with status ' + result.statusCode));
|
if (result.statusCode !== 200) return done(new Error('Get profile failed with status ' + result.statusCode));
|
||||||
|
|
Loading…
Reference in New Issue