From c42c482d64f61ca27af202dce82ef7e1e3a6d9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Thu, 12 Nov 2020 13:38:09 +0200 Subject: [PATCH] Fix CC issues --- .../api/v1/registrant/confirms_controller.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/controllers/api/v1/registrant/confirms_controller.rb b/app/controllers/api/v1/registrant/confirms_controller.rb index b04a72449..d03e7ab93 100644 --- a/app/controllers/api/v1/registrant/confirms_controller.rb +++ b/app/controllers/api/v1/registrant/confirms_controller.rb @@ -26,11 +26,9 @@ module Api return end - render json: { - domain_name: @domain.name, - current_registrant: serialized_registrant(current_registrant), - status: params[:decision], - } + render json: { domain_name: @domain.name, + current_registrant: serialized_registrant(current_registrant), + status: params[:decision] } end private @@ -96,11 +94,13 @@ module Api end def verify_action - if params[:template] == 'change' - return true if @domain.registrant_update_confirmable?(verify_params[:token]) - elsif params[:template] == 'delete' - return true if @domain.registrant_delete_confirmable?(verify_params[:token]) - end + action = if params[:template] == 'change' + @domain.registrant_update_confirmable?(verify_params[:token]) + elsif params[:template] == 'delete' + @domain.registrant_delete_confirmable?(verify_params[:token]) + end + + return unless action render json: { error: 'Application expired or not found' }, status: :unauthorized end