pipedrive_jetrockets 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a127788cb38ae14f3b46500066462d300a070a23430cafb09d05dd407c72d558
4
- data.tar.gz: 8aace60c6cc57988b42ccf6b1272527d27b07edd89bf39058b6249a7e344e096
3
+ metadata.gz: 4ee20eec66303d3ef69f5eb333d62454f050aded7513fef6a982ffa4e0e8b9ff
4
+ data.tar.gz: 104a41617433e4f7d9e932eac2ed05b81fe5a60c1faeaaf46049e94e2dad08b7
5
5
  SHA512:
6
- metadata.gz: 83ba01909b6f05614462eec9286dbc3de1ff4b6bb73b96b352ef5f96fb9d32de4dbae8eab1a201b9674741cb0d20032cd1d80ba60878851cf72806445e224e4f
7
- data.tar.gz: bcd520311e540816aeaebabe0fd3bef433c7857533923c9f74d5f692ad7d1eb5e0f187daf657f1d10c38ed785902c0ea98185c33792aaa829b6c3a22266f6b02
6
+ metadata.gz: 73da30f9b51d498a2a2b3e9ebfe3fb7613ad9ac0d9562635cd5ec132aaecf2b30bd3b13d4d29bbcc05403f83e807a25ea8d0a3e11df4991ab833a617c1332ee3
7
+ data.tar.gz: bf4de02d622588453c1c302b9ab7c414848dc3f7b14e205feb7c0af8981f7f794f8622bbb626a6ca9b93fdba5b16e3b10a8bd7bd7cea7ccbcc0db38b447ffea3
@@ -1,8 +1,12 @@
1
1
  module PipedriveJetrockets
2
2
  class EventsController < ApplicationController
3
3
  skip_before_action :verify_authenticity_token
4
- def index
5
- ActiveSupport::Notifications.instrument "event"
4
+ def deal_updated
5
+ current = JSON.parse(params[:current])
6
+ previous = JSON.parse(params[:previous])
7
+ if !current[:org_id].nil? && previous[:org_id].nil?
8
+ ActiveSupport::Notifications.instrument "organisation_added", { organisation_id: current[:org_id], deal_id: current[:id]}
9
+ end
6
10
  end
7
11
  end
8
12
  end
data/config/routes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
  scope '/pipedrive' do
3
- post '/events' => 'pipedrive_jetrockets/events#index'
3
+ post '/deal_updated' => 'pipedrive_jetrockets/events#deal_updated'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipedrive_jetrockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agafonov Maksim