Auth service now return invitations

stable
David Barragán Merino 2014-07-13 16:26:02 +02:00
parent 3fe3edfc77
commit fd1e009c82
1 changed files with 4 additions and 2 deletions

View File

@ -28,9 +28,9 @@ module = angular.module("taigaAuth", ["taigaResources"])
############################################################################# #############################################################################
class AuthService extends taiga.Service class AuthService extends taiga.Service
@.$inject = ["$rootScope", "$tgStorage", "$tgModel", "$tgHttp", "$tgUrls"] @.$inject = ["$rootScope", "$tgStorage", "$tgModel", "$tgResources", "$tgHttp", "$tgUrls"]
constructor: (@rootscope, @storage, @model, @http, @urls) -> constructor: (@rootscope, @storage, @model, @rs, @http, @urls) ->
super() super()
getUser: -> getUser: ->
@ -108,6 +108,8 @@ class AuthService extends taiga.Service
return @http.post(url, data) return @http.post(url, data)
getInvitation: (token) ->
return @rs.invitations.get(token)
# acceptInvitiationWithNewUser: (username, email, password, token) -> # acceptInvitiationWithNewUser: (username, email, password, token) ->
# url = @urls.resolve("auth-register") # url = @urls.resolve("auth-register")