Fixed getting started, only relogin first/master agent.
This commit is contained in:
parent
a6d67d851c
commit
c7baf0b6ab
1 changed files with 29 additions and 27 deletions
|
@ -87,28 +87,31 @@ class Index extends App.Controller
|
|||
# save user
|
||||
user.save(
|
||||
success: (r) =>
|
||||
# send email
|
||||
|
||||
# clear form
|
||||
if @master_user
|
||||
@master_user = false
|
||||
auth = new App.Auth
|
||||
auth.login(
|
||||
data: {
|
||||
username: @params.login,
|
||||
password: @params.password,
|
||||
},
|
||||
success: @success
|
||||
success: @relogin
|
||||
# error: @error,
|
||||
)
|
||||
else
|
||||
|
||||
# rerender page
|
||||
@render()
|
||||
|
||||
# error: =>
|
||||
# @modalHide()
|
||||
)
|
||||
|
||||
|
||||
success: (data, status, xhr) =>
|
||||
relogin: (data, status, xhr) =>
|
||||
@log 'login:success', data
|
||||
|
||||
if @master_user
|
||||
|
||||
# login check
|
||||
auth = new App.Auth
|
||||
auth.loginCheck()
|
||||
|
@ -122,8 +125,7 @@ class Index extends App.Controller
|
|||
@el.find('.master_user').fadeOut('slow', =>
|
||||
@el.find('.agent_user').fadeIn()
|
||||
)
|
||||
# redirect to #
|
||||
# @navigate '#getting_started'
|
||||
# @fetch()
|
||||
|
||||
|
||||
|
||||
Config.Routes['getting_started'] = Index
|
||||
|
|
Loading…
Reference in a new issue