[backport] Fxed broadcast on auth events

stable
Jesús Espino 2017-11-22 17:51:37 +01:00
parent e457097799
commit 19e0268cc3
1 changed files with 4 additions and 4 deletions

View File

@ -161,7 +161,7 @@ class AuthService extends taiga.Service
user = @model.make_model("users", user)
@.setUser(user)
@rootscope.broadcast("auth:refresh", user)
@rootscope.$broadcast("auth:refresh", user)
return user
login: (data, type) ->
@ -176,7 +176,7 @@ class AuthService extends taiga.Service
user = @model.make_model("users", data.data)
@.setToken(user.auth_token)
@.setUser(user)
@rootscope.broadcast("auth:login", user)
@rootscope.$broadcast("auth:login", user)
return user
logout: ->
@ -186,7 +186,7 @@ class AuthService extends taiga.Service
@._setTheme()
@._setLocales()
@rootscope.broadcast("auth:logout")
@rootscope.$broadcast("auth:logout")
@analytics.setUserId()
register: (data, type, existing) ->
@ -203,7 +203,7 @@ class AuthService extends taiga.Service
user = @model.make_model("users", response.data)
@.setToken(user.auth_token)
@.setUser(user)
@rootscope.broadcast("auth:register", user)
@rootscope.$broadcast("auth:register", user)
return user
getInvitation: (token) ->