[pro-merge] Add token when fetching logs
This commit is contained in:
parent
8309941c95
commit
73f06eba0f
|
@ -73,6 +73,9 @@ Travis.Log.Request = Em.Object.extend
|
||||||
success: (body, status, xhr) => Ember.run(this, -> @handle(body, status, xhr))
|
success: (body, status, xhr) => Ember.run(this, -> @handle(body, status, xhr))
|
||||||
|
|
||||||
handle: (body, status, xhr) ->
|
handle: (body, status, xhr) ->
|
||||||
|
if Travis.config.pro
|
||||||
|
Travis.Job.find(@get('id')).get('log').set('token', xhr.getResponseHeader('X-Log-Access-Token'))
|
||||||
|
|
||||||
if xhr.status == 204
|
if xhr.status == 204
|
||||||
$.ajax(url: @redirectTo(xhr), type: 'GET', success: @handlers.text)
|
$.ajax(url: @redirectTo(xhr), type: 'GET', success: @handlers.text)
|
||||||
else if @isJson(xhr, body)
|
else if @isJson(xhr, body)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user