diff --git a/app/controllers/readings_controller.rb b/app/controllers/readings_controller.rb index 3a08dee..de4259c 100644 --- a/app/controllers/readings_controller.rb +++ b/app/controllers/readings_controller.rb @@ -54,7 +54,7 @@ class ReadingsController < ActionController::API r.tap do |r| r.name = params[:controller_id] r.serial_number = params[:serial_number] - r.public_keys.find_or_create_by(content: request.headers[:'X-Public-Key']) + r.public_keys.find_or_create_by(content: params[:public_key]) r.save end end