mirror of
https://git.cloudron.io/cloudron/gitea-app.git
synced 2024-11-25 17:31:01 +00:00
Fix api use
This commit is contained in:
parent
b39e1850d7
commit
c2419ba46c
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue