no crear nada cuando el colector está probando la conexión

This commit is contained in:
f 2022-03-03 14:45:52 -03:00
parent 788f63597e
commit 14eeab50e2

View file

@ -6,6 +6,11 @@ class ReadingsController < ActionController::API
# @see {https://docutopia.tupale.co/sutty:nodemecu:api} # @see {https://docutopia.tupale.co/sutty:nodemecu:api}
def create def create
if reading_params.empty?
head :ok
return
end
Reading.transaction do Reading.transaction do
reading = raspberry.readings.build reading_params reading = raspberry.readings.build reading_params
reading.id = params[:transaction_uuid] reading.id = params[:transaction_uuid]