mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-27 01:59:28 +08:00
Fix HTTParty request after gem upgrade
This commit is contained in:
parent
68bace8ba2
commit
6851746bf6
1 changed files with 3 additions and 3 deletions
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue