no crear nada cuando el colector está probando la conexión
This commit is contained in:
parent
788f63597e
commit
14eeab50e2
1 changed files with 5 additions and 0 deletions
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue