Commit 552bad92 authored by Randall Leeds's avatar Randall Leeds

Backwards compatibility with stable /app route

Convert {username, provider} objects to strings.
parent f84dcc04
......@@ -637,6 +637,7 @@ class AuthenticationProvider
load:
method: 'GET'
withCredentials: true
interceptor: this
for action in ['login', 'logout', 'register', 'forgot', 'activate']
@actions[action] =
......@@ -644,11 +645,20 @@ class AuthenticationProvider
params:
'__formid__': action
withCredentials: true
interceptor: this
response: (response) => # bw compat
if angular.isObject(@model.persona)
persona = @model.persona
@model.persona = "acct:#{persona.username}@#{persona.provider}"
@model.personas = for persona in @model.personas
"acct:#{persona.username}@#{persona.provider}"
response
$get: [
'$resource', 'baseURI'
($resource, baseURI) ->
$resource(baseURI, {}, @actions).load()
@model = $resource(baseURI, {}, @actions).load()
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment