actually check if github sent a token
This commit is contained in:
parent
3d8c9ed914
commit
44d6c02591
|
@ -227,7 +227,9 @@ class Travis::Api::App
|
||||||
def get_token(endoint, values)
|
def get_token(endoint, values)
|
||||||
response = Faraday.post(endoint, values)
|
response = Faraday.post(endoint, values)
|
||||||
parameters = Addressable::URI.form_unencode(response.body)
|
parameters = Addressable::URI.form_unencode(response.body)
|
||||||
parameters.assoc("access_token").last
|
token_info = parameters.assoc("access_token")
|
||||||
|
halt 401, 'could not resolve github token' unless token_info
|
||||||
|
token_info.last
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_scopes(data)
|
def parse_scopes(data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user