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: =>
|
||||
|
||||
# login check
|
||||
auth = new App.Auth
|
||||
auth.loginCheck()
|
||||
App.Auth.loginCheck()
|
||||
)
|
||||
|
|
|
@ -90,8 +90,7 @@ class Index extends App.Controller
|
|||
|
||||
if @master_user
|
||||
@master_user = false
|
||||
auth = new App.Auth
|
||||
auth.login(
|
||||
App.Auth.login(
|
||||
data: {
|
||||
username: @params.login,
|
||||
password: @params.password,
|
||||
|
@ -113,8 +112,7 @@ class Index extends App.Controller
|
|||
@log 'login:success', data
|
||||
|
||||
# login check
|
||||
auth = new App.Auth
|
||||
auth.loginCheck()
|
||||
App.Auth.loginCheck()
|
||||
|
||||
# add notify
|
||||
Spine.trigger 'notify:removeall'
|
||||
|
|
|
@ -60,8 +60,7 @@ class Index extends App.Controller
|
|||
@username = params['username']
|
||||
|
||||
# session create with login/password
|
||||
auth = new App.Auth
|
||||
auth.login(
|
||||
App.Auth.login(
|
||||
data: params,
|
||||
success: @success
|
||||
error: @error,
|
||||
|
|
|
@ -10,8 +10,7 @@ class Index extends Spine.Controller
|
|||
signout: ->
|
||||
|
||||
# remove remote session
|
||||
auth = new App.Auth
|
||||
auth.logout()
|
||||
App.Auth.logout()
|
||||
|
||||
# remoce local session
|
||||
@log 'Session', window.Session
|
||||
|
|
|
@ -61,8 +61,7 @@ class Index extends App.Controller
|
|||
# save user
|
||||
user.save(
|
||||
success: (r) =>
|
||||
auth = new App.Auth
|
||||
auth.login(
|
||||
App.Auth.login(
|
||||
data: {
|
||||
username: @params.login,
|
||||
password: @params.password,
|
||||
|
@ -77,8 +76,7 @@ class Index extends App.Controller
|
|||
success: (data, status, xhr) =>
|
||||
|
||||
# login check
|
||||
auth = new App.Auth
|
||||
auth.loginCheck()
|
||||
App.Auth.loginCheck()
|
||||
|
||||
# add notify
|
||||
Spine.trigger 'notify:removeall'
|
||||
|
|
Loading…
Reference in a new issue