Class: LeonardoController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/generators/leoandruby/templates/leonardo_controller.rb

Instance Method Summary collapse

Instance Method Details

#webhookObject



6
7
8
9
10
11
# File 'lib/generators/leoandruby/templates/leonardo_controller.rb', line 6

def webhook
  payload = JSON.parse(request.body.read)
  # TODO: Process the incoming webhook payload
  Rails.logger.info("Received webhook: #{payload}")
  render json: {status: "success"}, status: :ok
end