Fix api use

This commit is contained in:
Girish Ramakrishnan 2018-05-03 09:44:20 -07:00
parent b39e1850d7
commit c2419ba46c
1 changed files with 2 additions and 2 deletions

View File

@ -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));