diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 75f7187..616ff5a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,4 +7,11 @@ class ApplicationController < ActionController::Base end def index end + + # Por ahora hacer un echo de cada transacción + # + # @see {https://docutopia.tupale.co/sutty:nodemecu:api} + def transactions + render plain: params[:transaction_uuid], status: :ok + end end diff --git a/config/routes.rb b/config/routes.rb index be7de5c..79813eb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,4 +5,6 @@ Rails.application.routes.draw do resources :measurements, only: [:create] end mount Blazer::Engine, at: 'blazer' + + post :transactions, to: 'application#transactions' end