From f81841f1822c02a69187385b75379f011e191074 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 19 Oct 2021 16:04:17 -0300 Subject: [PATCH] =?UTF-8?q?prepar=C3=A1ndonos=20para=20la=20nueva=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 7 +++++++ config/routes.rb | 2 ++ 2 files changed, 9 insertions(+) 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