mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
fixed codeclimate errors
This commit is contained in:
parent
e0c47cdb35
commit
788af6cc5f
15 changed files with 32 additions and 31 deletions
|
@ -1,5 +1,5 @@
|
|||
module Epp
|
||||
class BaseController < ActionController::Base
|
||||
class BaseController < ApplicationController
|
||||
class AuthorizationError < StandardError; end
|
||||
skip_before_action :verify_authenticity_token
|
||||
check_authorization
|
||||
|
|
|
@ -35,15 +35,13 @@ class Registrar
|
|||
@depp_user.errors.add(:base, :invalid_cert)
|
||||
end
|
||||
|
||||
if @depp_user.errors.none?
|
||||
if @api_user.active?
|
||||
sign_in_and_redirect(:registrar_user, @api_user)
|
||||
else
|
||||
@depp_user.errors.add(:base, :not_active)
|
||||
show_error and return
|
||||
end
|
||||
show_error and return unless @depp_user.errors.none?
|
||||
|
||||
if @api_user.active?
|
||||
sign_in_and_redirect(:registrar_user, @api_user)
|
||||
else
|
||||
show_error and return
|
||||
@depp_user.errors.add(:base, :not_active)
|
||||
show_error
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue