guardar la firma

This commit is contained in:
f 2022-03-12 16:00:09 -03:00
parent 6c3ee2911b
commit b766d37631

View file

@ -15,7 +15,7 @@ class ReadingsController < ActionController::API
reading = raspberry.readings.build reading_params reading = raspberry.readings.build reading_params
reading.id = params[:transaction_uuid] reading.id = params[:transaction_uuid]
# TODO: Verificar firma # TODO: Verificar firma
reading.signature = headers[:'X-Signature'] reading.signature = request.headers[:'X-Signature']
params[:arduinos]&.each do |a| params[:arduinos]&.each do |a|
arduino = reading.arduinos.build local_id: a[:id], raspberry: raspberry arduino = reading.arduinos.build local_id: a[:id], raspberry: raspberry