Changed App.Auth to method mode.
This commit is contained in:
parent
99d1bfce00
commit
bd0b29a200
5 changed files with 7 additions and 14 deletions
|
@ -65,6 +65,5 @@ class App.SettingsAreaItem extends App.Controller
|
||||||
success: =>
|
success: =>
|
||||||
|
|
||||||
# login check
|
# login check
|
||||||
auth = new App.Auth
|
App.Auth.loginCheck()
|
||||||
auth.loginCheck()
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -90,8 +90,7 @@ class Index extends App.Controller
|
||||||
|
|
||||||
if @master_user
|
if @master_user
|
||||||
@master_user = false
|
@master_user = false
|
||||||
auth = new App.Auth
|
App.Auth.login(
|
||||||
auth.login(
|
|
||||||
data: {
|
data: {
|
||||||
username: @params.login,
|
username: @params.login,
|
||||||
password: @params.password,
|
password: @params.password,
|
||||||
|
@ -113,8 +112,7 @@ class Index extends App.Controller
|
||||||
@log 'login:success', data
|
@log 'login:success', data
|
||||||
|
|
||||||
# login check
|
# login check
|
||||||
auth = new App.Auth
|
App.Auth.loginCheck()
|
||||||
auth.loginCheck()
|
|
||||||
|
|
||||||
# add notify
|
# add notify
|
||||||
Spine.trigger 'notify:removeall'
|
Spine.trigger 'notify:removeall'
|
||||||
|
|
|
@ -60,8 +60,7 @@ class Index extends App.Controller
|
||||||
@username = params['username']
|
@username = params['username']
|
||||||
|
|
||||||
# session create with login/password
|
# session create with login/password
|
||||||
auth = new App.Auth
|
App.Auth.login(
|
||||||
auth.login(
|
|
||||||
data: params,
|
data: params,
|
||||||
success: @success
|
success: @success
|
||||||
error: @error,
|
error: @error,
|
||||||
|
|
|
@ -10,8 +10,7 @@ class Index extends Spine.Controller
|
||||||
signout: ->
|
signout: ->
|
||||||
|
|
||||||
# remove remote session
|
# remove remote session
|
||||||
auth = new App.Auth
|
App.Auth.logout()
|
||||||
auth.logout()
|
|
||||||
|
|
||||||
# remoce local session
|
# remoce local session
|
||||||
@log 'Session', window.Session
|
@log 'Session', window.Session
|
||||||
|
|
|
@ -61,8 +61,7 @@ class Index extends App.Controller
|
||||||
# save user
|
# save user
|
||||||
user.save(
|
user.save(
|
||||||
success: (r) =>
|
success: (r) =>
|
||||||
auth = new App.Auth
|
App.Auth.login(
|
||||||
auth.login(
|
|
||||||
data: {
|
data: {
|
||||||
username: @params.login,
|
username: @params.login,
|
||||||
password: @params.password,
|
password: @params.password,
|
||||||
|
@ -77,8 +76,7 @@ class Index extends App.Controller
|
||||||
success: (data, status, xhr) =>
|
success: (data, status, xhr) =>
|
||||||
|
|
||||||
# login check
|
# login check
|
||||||
auth = new App.Auth
|
App.Auth.loginCheck()
|
||||||
auth.loginCheck()
|
|
||||||
|
|
||||||
# add notify
|
# add notify
|
||||||
Spine.trigger 'notify:removeall'
|
Spine.trigger 'notify:removeall'
|
||||||
|
|
Loading…
Reference in a new issue