diff --git a/app/controllers/readings_controller.rb b/app/controllers/readings_controller.rb index 135df50..796fe1f 100644 --- a/app/controllers/readings_controller.rb +++ b/app/controllers/readings_controller.rb @@ -12,7 +12,7 @@ class ReadingsController < ActionController::API reading.signature = headers[:'X-Signature'] params[:arduinos]&.each do |a| - arduino = reading.arduinos.build local_id: a[:id] + arduino = reading.arduinos.build local_id: a[:id], raspberry: raspberry a[:sensores]&.each do |s| arduino.sensors.build(sensor_params s)