Created
November 21, 2019 17:13
-
-
Save victorgiraldes/a3aef1878056e85dc2ea25c22c53d8e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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