Skip to content

Instantly share code, notes, and snippets.

@victorgiraldes
Created November 21, 2019 17:13
Show Gist options
  • Save victorgiraldes/a3aef1878056e85dc2ea25c22c53d8e4 to your computer and use it in GitHub Desktop.
Save victorgiraldes/a3aef1878056e85dc2ea25c22c53d8e4 to your computer and use it in GitHub Desktop.
module Api
module V1
class WebhookController < Api::V1::ApplicationController
def index
service = Services::Webhook::WebhookData.new
rs = service.all
render json: rs.body, status: rs.code
end
def create
service = Services::Webhook::WebhookData.new
rs = service.create(params)
render json: rs.body, status: rs.code
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment