usar un controlador de api
This commit is contained in:
parent
f81841f182
commit
6e5336f9bb
3 changed files with 11 additions and 8 deletions
10
app/controllers/api_controller.rb
Normal file
10
app/controllers/api_controller.rb
Normal 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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue