Fixed error code of failed login.

This commit is contained in:
Martin Edenhofer 2013-08-04 23:38:53 +02:00
parent c87bd1a800
commit 5ea6542805
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@ class _ajaxSingleton
return if status is 0
# do not show any error message on wrong login
return if status is 422
return if status is 401 && !settings.url.match('login')
# do not show any error message with code 200
return if status is 200

View file

@ -13,7 +13,7 @@ class SessionsController < ApplicationController
# auth failed
if !user
render :json => { :error => 'login failed' }, :status => :unprocessable_entity
render :json => { :error => 'login failed' }, :status => :unauthorized
return
end