authenticate owner request for realz
This commit is contained in:
parent
47d8951535
commit
d6fa74c8f6
|
@ -9,14 +9,11 @@ Route = TravisRoute.extend
|
||||||
@controllerFor('loading').set('layoutName', null)
|
@controllerFor('loading').set('layoutName', null)
|
||||||
|
|
||||||
model: (params) ->
|
model: (params) ->
|
||||||
if @get('auth.signedIn')
|
$.ajax(config.apiEndpoint + "/v3/owner/#{params.owner}", {
|
||||||
$.get(config.apiEndpoint + "/v3/owner/#{params.owner}", {
|
headers: {
|
||||||
headers: {
|
Authorization: "token #{@auth.token()}"
|
||||||
Authorization: "token #{@auth.token()}"
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
else
|
|
||||||
$.get(config.apiEndpoint + "/v3/owner/#{params.owner}")
|
|
||||||
|
|
||||||
beforeModel: ->
|
beforeModel: ->
|
||||||
@controllerFor('loading').set('layoutName', 'simple')
|
@controllerFor('loading').set('layoutName', 'simple')
|
||||||
|
|
|
@ -10,6 +10,11 @@ Route = TravisRoute.extend
|
||||||
"#{model.name}"
|
"#{model.name}"
|
||||||
|
|
||||||
model: (params, transition) ->
|
model: (params, transition) ->
|
||||||
$.get(config.apiEndpoint + "/v3/owner/#{transition.params.owner.owner}?include=user.repositories,organization.repositories,build.commit,repository.active")
|
$.ajax(config.apiEndpoint + "/v3/owner/#{transition.params.owner.owner}?include=user.repositories,organization.repositories,build.commit,repository.active", {
|
||||||
|
headers: {
|
||||||
|
Authorization: "token #{@auth.token()}"
|
||||||
|
},
|
||||||
|
type: "GET"
|
||||||
|
})
|
||||||
|
|
||||||
`export default Route`
|
`export default Route`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{#if repo.private }}
|
{{!-- {{#if repo.private }}
|
||||||
<div class="tile-lock"><span class="icon icon-lock"></span></div>
|
<div class="tile-lock"><span class="icon icon-lock"></span></div>
|
||||||
{{/if}}
|
{{/if}} --}}
|
||||||
<div class="repo">
|
<div class="repo">
|
||||||
{{#if isAnimating}}
|
{{#if isAnimating}}
|
||||||
<span class="icon-owner-receiving"><i></i><i></i><i></i></span>
|
<span class="icon-owner-receiving"><i></i><i></i><i></i></span>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user