MCPcopy Create free account
hub / github.com/CloudBoost/cloudboost / getUserByAccessToken

Function getUserByAccessToken

helpers/github.js:96–115  ·  view source on GitHub ↗
(req, appId, authSettings, accessToken)

Source from the content-addressed store, hash-verified

94 },
95
96 getUserByAccessToken(req, appId, authSettings, accessToken) {
97 const deferred = q.defer();
98
99 try {
100 const client = github.client(accessToken);
101
102 client.get('/user', {}, (err, status, body) => {
103 if (err) {
104 deferred.reject(err);
105 } else {
106 deferred.resolve(body);
107 }
108 });
109 } catch (err) {
110 winston.log('error', { error: String(err), stack: new Error().stack });
111 deferred.reject(err);
112 }
113
114 return deferred.promise;
115 },
116
117
118};

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected