mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-29 03:01:58 +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))
|
.split('/').map(&:to_sym))
|
||||||
api_client = "ProtocolImporters::#{endpoint_name}::ApiClient".constantize.new
|
api_client = "ProtocolImporters::#{endpoint_name}::ApiClient".constantize.new
|
||||||
|
|
||||||
html_preview = api_client.protocol_html_preview(show_params[:protocol_id])
|
html_preview_request = api_client.protocol_html_preview(show_params[:protocol_id])
|
||||||
base_uri = URI.parse(html_preview.request.last_uri.to_s)
|
base_uri = URI.parse(html_preview_request.request.last_uri.to_s)
|
||||||
base_uri = "#{base_uri.scheme}://#{base_uri.host}"
|
base_uri = "#{base_uri.scheme}://#{base_uri.host}"
|
||||||
|
|
||||||
render json: {
|
render json: {
|
||||||
protocol_source: show_params[:protocol_source],
|
protocol_source: show_params[:protocol_source],
|
||||||
protocol_id: show_params[:protocol_id],
|
protocol_id: show_params[:protocol_id],
|
||||||
base_uri: base_uri,
|
base_uri: base_uri,
|
||||||
html: html_preview
|
html: html_preview_request.body
|
||||||
}
|
}
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
render json: {
|
render json: {
|
||||||
|
|
Loading…
Reference in a new issue