Project

General

Profile

« Previous | Next » 

Revision 408774ae

Added by Dominic Cleal over 6 years ago

Fixes #20952 - Replace AC::Parameters Hash methods

Replaces any methods that used to be from Hash with the more limited
ActionController::Parameters API.

View differences:

app/controllers/api/v2/hosts_controller.rb
def facts
@host = detect_host_type.import_host params[:name], params[:facts][:_type] || 'puppet', params[:certname], detected_proxy.try(:id)
state = @host.import_facts(params[:facts])
state = @host.import_facts(params[:facts].to_unsafe_h)
process_response state
rescue ::Foreman::Exception => e
render_message(e.to_s, :status => :unprocessable_entity)

Also available in: Unified diff