From 0612d16e6bd46a74582cdced0c3ff747d2770e87 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 14 Mar 2022 17:32:28 -0300 Subject: [PATCH] la llave publica viene dentro del json --- app/controllers/readings_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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