Fixed error code of failed login.
This commit is contained in:
parent
c87bd1a800
commit
5ea6542805
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue