From 6851746bf6c5a6da557064f2b792f0d513a8617b Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Wed, 17 Feb 2021 13:30:10 +0100 Subject: [PATCH] Fix HTTParty request after gem upgrade --- app/controllers/external_protocols_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/external_protocols_controller.rb b/app/controllers/external_protocols_controller.rb index a3d13bda8..ed0e84439 100644 --- a/app/controllers/external_protocols_controller.rb +++ b/app/controllers/external_protocols_controller.rb @@ -30,15 +30,15 @@ class ExternalProtocolsController < ApplicationController .split('/').map(&:to_sym)) api_client = "ProtocolImporters::#{endpoint_name}::ApiClient".constantize.new - html_preview = api_client.protocol_html_preview(show_params[:protocol_id]) - base_uri = URI.parse(html_preview.request.last_uri.to_s) + html_preview_request = api_client.protocol_html_preview(show_params[:protocol_id]) + base_uri = URI.parse(html_preview_request.request.last_uri.to_s) base_uri = "#{base_uri.scheme}://#{base_uri.host}" render json: { protocol_source: show_params[:protocol_source], protocol_id: show_params[:protocol_id], base_uri: base_uri, - html: html_preview + html: html_preview_request.body } rescue StandardError => e render json: {