Code cleanup.
This commit is contained in:
parent
8ef89f0635
commit
cb4e9a8745
1 changed files with 3 additions and 11 deletions
|
@ -48,20 +48,12 @@ class Index extends App.Controller
|
||||||
|
|
||||||
login: (e) ->
|
login: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation();
|
params = @formParam(e.target)
|
||||||
|
|
||||||
@log 'submit', $(e.target)
|
|
||||||
@username = $(e.target).find('[name="username"]').val()
|
|
||||||
@password = $(e.target).find('[name="password"]').val()
|
|
||||||
# @log @username, @password
|
|
||||||
|
|
||||||
# session create with login/password
|
# session create with login/password
|
||||||
auth = new App.Auth
|
auth = new App.Auth
|
||||||
auth.login(
|
auth.login(
|
||||||
data: {
|
data: params,
|
||||||
username: @username,
|
|
||||||
password: @password,
|
|
||||||
},
|
|
||||||
success: @success
|
success: @success
|
||||||
error: @error,
|
error: @error,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue