transaction es un nombre reservado
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
closes Nodemecu/nodemecu#10
This commit is contained in:
parent
3ff7e4aa41
commit
868b3457a8
2 changed files with 9 additions and 1 deletions
|
@ -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]
|
||||||
reading.signature = request.headers[:'X-Signature']
|
reading.signature = request.headers[:'X-Signature']
|
||||||
reading.transaction = request.raw_post
|
reading.raw_transaction = request.raw_post
|
||||||
reading.verified = reading.verify
|
reading.verified = reading.verify
|
||||||
|
|
||||||
params[:arduinos]&.each do |a|
|
params[:arduinos]&.each do |a|
|
||||||
|
|
8
db/migrate/20220319153246_rename_transaction.rb
Normal file
8
db/migrate/20220319153246_rename_transaction.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Transaction es un nombre reservado por Rails
|
||||||
|
class RenameTransaction < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
rename_column :readings, :transaction, :raw_transaction
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue