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