forked from Trustie/forgeplus
fix
This commit is contained in:
parent
9827b7b72b
commit
5adabc67c8
|
|
@ -98,20 +98,20 @@ class Api::V1::Projects::CodeChecksController < Api::V1::BaseController
|
|||
end
|
||||
|
||||
def query_generate_pdf
|
||||
result = @client.query_generate_pdf(params[:async_job_id])
|
||||
send_data(
|
||||
result[:data],
|
||||
filename: result[:filename],
|
||||
type: result[:content_type],
|
||||
disposition: "attachment"
|
||||
)
|
||||
@result = @client.query_generate_pdf(params[:async_job_id])
|
||||
render :index
|
||||
end
|
||||
|
||||
def download_pdf
|
||||
allowed_query = %w[job_file]
|
||||
query_params, _ = filter_params(allowed_query_keys: allowed_query)
|
||||
@result = @client.download_pdf(query_params)
|
||||
render :index
|
||||
send_data(
|
||||
@result[:data],
|
||||
filename: @result[:filename],
|
||||
type: @result[:content_type],
|
||||
disposition: "attachment"
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Reference in New Issue