File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ class CallbacksController < ApplicationController
2+ skip_before_action :verify_authenticity_token
3+
4+ def index
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+
19+ end
20+ end
Original file line number Diff line number Diff line change 1+ class Callback < ApplicationRecord
2+ end
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+ < h1 > Hello API event received</ h1 >
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
45
56 root 'signs#index'
67
78 post '/' => 'signs#index'
89
10+ get '/callbacks' => 'callbacks#index'
11+ post '/callbacks' => 'callbacks#create'
12+
913 get 'account' => 'signs#account'
1014 get 'signature-request' => 'signs#signature_request'
1115 get 'all-requests' => 'signs#all_requests'
2428 get '/embeddeds/unclaimed-draft' => 'embeddeds#unclaimed_draft'
2529 get '/embeddeds/unclaimed-draft-template' => 'embeddeds#unclaimed_draft_template'
2630 get '/embeddeds/template-draft' => 'embeddeds#template_draft'
31+
2732end
You can’t perform that action at this time.
0 commit comments