usar un controlador de api

This commit is contained in:
f 2021-10-19 16:20:16 -03:00
parent f81841f182
commit 6e5336f9bb
3 changed files with 11 additions and 8 deletions

View file

@ -0,0 +1,10 @@
# frozen_string_literal: true
class ApiController < ActionController::API
# 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

View file

@ -7,11 +7,4 @@ 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

View file

@ -6,5 +6,5 @@ Rails.application.routes.draw do
end
mount Blazer::Engine, at: 'blazer'
post :transactions, to: 'application#transactions'
post :transactions, to: 'api#transactions'
end