File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11class CallbacksController < ApplicationController
2+ skip_before_action :verify_authenticity_token
3+
24 def index
3- @event = params [ "json" ]
5+ @event = JSON . parse ( params . to_json , symbolize_names : true )
6+ end
7+
8+ def create
9+ event = JSON . parse ( params [ "json" ] , symbolize_names : true )
10+ # event = @response["json"]
11+ # object = JSON.parse(event, symbolize_names: true)
12+ # p "***** EVENT TYPE"
13+ # p event_type = object[:event][:event_type]
14+
15+ # client = Sign.initiate_client
16+
17+ event_type = event [ :event ] [ :event_type ]
18+
419 end
520end
Original file line number Diff line number Diff line change 1+ Hello API event received
2+
3+ <%= @event %>
Original file line number Diff line number Diff line change 1- Hello API event received
2-
3- < div class ="response-data ">
4- <%= @event %>
5- </ div >
1+ <%= @event %>
Original file line number Diff line number Diff line change 11Rails . application . routes . draw do
22 # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
33 resources :signs
4- resources :callbacks
4+ # resources :callbacks
55
66 root 'signs#index'
77
88 post '/' => 'signs#index'
99
10+ get '/callbacks' => 'callbacks#index'
11+ post '/callbacks' => 'callbacks#create'
12+
1013 get 'account' => 'signs#account'
1114 get 'signature-request' => 'signs#signature_request'
1215 get 'all-requests' => 'signs#all_requests'
2528 get '/embeddeds/unclaimed-draft' => 'embeddeds#unclaimed_draft'
2629 get '/embeddeds/unclaimed-draft-template' => 'embeddeds#unclaimed_draft_template'
2730 get '/embeddeds/template-draft' => 'embeddeds#template_draft'
31+
32+
2833end
You can’t perform that action at this time.
0 commit comments