Fix redirection after sign-in

Closes #973
This commit is contained in:
Artur Beljajev 2018-09-12 13:55:22 +03:00
parent 2b273d26fa
commit 0fef419799

View file

@ -115,7 +115,7 @@ class Registrar
sign_in(:registrar_user, @user) sign_in(:registrar_user, @user)
flash[:notice] = t(:welcome) flash[:notice] = t(:welcome)
flash.keep(:notice) flash.keep(:notice)
render js: "window.location = '#{registrar_root_url}'" render js: "window.location = '#{after_sign_in_path_for(@user)}'"
when 'NOT_VALID' when 'NOT_VALID'
render json: { message: t(:user_signature_is_invalid) }, status: :bad_request render json: { message: t(:user_signature_is_invalid) }, status: :bad_request
when 'EXPIRED_TRANSACTION' when 'EXPIRED_TRANSACTION'