Ember CLI compat - don't use Travis.*
This commit is contained in:
parent
56f4be5bb1
commit
1be07ae5f7
|
@ -60,14 +60,14 @@ Controller = Ember.ArrayController.extend
|
|||
|
||||
userRepos: (->
|
||||
if login = @get('currentUser.login')
|
||||
Travis.Repo.accessibleBy(@store, login)
|
||||
Repo.accessibleBy(@store, login)
|
||||
else
|
||||
[]
|
||||
).property('currentUser.login')
|
||||
|
||||
viewSearch: (phrase) ->
|
||||
@set('search', phrase)
|
||||
@set('content', Travis.Repo.search(@store, phrase))
|
||||
@set('content', Repo.search(@store, phrase))
|
||||
|
||||
searchObserver: (->
|
||||
search = @get('search')
|
||||
|
|
|
@ -42,7 +42,7 @@ ajax = Em.Object.create
|
|||
options = options || {}
|
||||
|
||||
token = Travis.sessionStorage.getItem('travis.token')
|
||||
if token && (Travis.ajax.needsAuth(method, url) || options.forceAuth)
|
||||
if token && (ajax.needsAuth(method, url) || options.forceAuth)
|
||||
options.headers ||= {}
|
||||
options.headers['Authorization'] ||= "token #{token}"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
config = ENV.config
|
||||
Ajax = Travis.ajax
|
||||
|
||||
Auth = Ember.Object.extend
|
||||
state: "signed-out"
|
||||
|
@ -76,7 +77,7 @@ Auth = Ember.Object.extend
|
|||
@refreshUserData(data.user)
|
||||
|
||||
refreshUserData: (user) ->
|
||||
Travis.ajax.get "/users/#{user.id}", (data) =>
|
||||
Ajax.get "/users/#{user.id}", (data) =>
|
||||
@store.pushPayload(users: [data.user])
|
||||
# if user is still signed in, update saved data
|
||||
if @get('signedIn')
|
||||
|
|
Loading…
Reference in New Issue
Block a user