Class: PandaPal::ApiCallController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PandaPal::ApiCallController
- Defined in:
- app/controllers/panda_pal/api_call_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/panda_pal/api_call_controller.rb', line 25 def call ac = ApiCall.from_jwt(params.require(:token)) result = ac.call(params.to_unsafe_h) render json: { status: 'ok', uses_remaining: ac.uses_remaining, result: result, } end |