set Authorization header

This commit is contained in:
Konstantin Haase 2012-09-18 19:48:07 +02:00
parent 0ac50d038f
commit ab3ca42c67
2 changed files with 4 additions and 1 deletions

View File

@ -30,4 +30,7 @@ jQuery.support.cors = true
ajax: (url, method, options) ->
endpoint = Travis.config.api_endpoint || ''
if Travis.config.access_token
options.headers ||= {}
options.headers['Authorization'] ||= "token #{Travis.config.access_token}"
@_super("#{endpoint}#{url}", method, $.extend(options, @DEFAULT_OPTIONS))

File diff suppressed because one or more lines are too long