Class: PandaPal::ApiCallController

Inherits:
ApplicationController show all
Defined in:
app/controllers/panda_pal/api_call_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#share_controller_on_thread

Instance Method Details

#callObject



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