Code cleanup.

This commit is contained in:
Martin Edenhofer 2012-04-20 10:57:23 +02:00
parent 8ef89f0635
commit cb4e9a8745

View file

@ -48,20 +48,12 @@ 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,
)