Skip to content

Commit

Permalink
Update untappd
Browse files Browse the repository at this point in the history
  • Loading branch information
simov committed Oct 10, 2021
1 parent 111e7d3 commit ea29993
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions lib/flow/oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ exports.access = ({request:client}) => async ({provider, input, input:{query, bo
if (provider.intuit) {
output.realmId = query.realmId
}
if (provider.untappd) {
output = output.response
}
if (provider.withings && /wbsapi/.test(provider.access_url)) {
output = output.body
}
Expand Down
3 changes: 2 additions & 1 deletion test/flow/oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ describe('oauth2', () => {
})
t.deepEqual(response, {
access_token: 'token',
raw: {access_token: 'token'}
refresh_token: 'refresh',
raw: {access_token: 'token', refresh_token: 'refresh', expires_in: '3600'}
})
})

Expand Down
4 changes: 0 additions & 4 deletions test/util/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ var oauth2 = (port) => new Promise((resolve) => {
res.writeHead(200, {'content-type': 'application/json'})
provider === 'concur'
? res.end(' <Token>token</Token> <Refresh_Token>refresh</Refresh_Token> ')
: provider === 'untappd'
? res.end(JSON.stringify({response: {
access_token: 'token'
}}))
: provider === 'withings'
? res.end(JSON.stringify({body: {
access_token: 'token', refresh_token: 'refresh', expires_in: 3600
Expand Down

0 comments on commit ea29993

Please sign in to comment.