wco_models 3.1.0.298 → 3.1.0.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 85d0f9cb5751a72aeb7b9e1c5f5e9b2c214651c32d6f72c7bf8810779ba88fc7
|
|
4
|
+
data.tar.gz: db30f4c53771bd033fa413d9031e2d852b1d390d77b7742107adb049f551a1d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07d605a7ec77f355862a3ec60e2f44fbc8b715de3e6d89a7f57109a1abc1cf289c79a3c4424d61316600c89e4ee95a6510c4ad923f2613cd45e73a28a4c79066
|
|
7
|
+
data.tar.gz: a8a390ed961f591d1e9cb481653252c63989b0c6820eec53da41ece91b28104a689af3091ca0dc50795b89d4263db624413077114acb7a5e37385fcdb258a855
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
class Wco::Api::LeadsController < Wco::ApiController
|
|
3
3
|
|
|
4
4
|
skip_before_action :decode_jwt
|
|
5
|
+
before_action :check_credentials, only: [ :by_email ]
|
|
6
|
+
|
|
7
|
+
def by_email
|
|
8
|
+
@lead = Wco::Lead.where( email: params[:email] ).first
|
|
9
|
+
end
|
|
5
10
|
|
|
6
11
|
## select2-leads-ajax
|
|
7
12
|
def index
|
|
@@ -9,6 +9,13 @@ class Wco::ApiController < ActionController::Base
|
|
|
9
9
|
##
|
|
10
10
|
private
|
|
11
11
|
|
|
12
|
+
def check_credentials
|
|
13
|
+
if params[:secret] != AWS_SES_LAMBDA_SECRET
|
|
14
|
+
render status: 400, json: { status: 400, message: "#check_credentials in wco says unauthorized." }
|
|
15
|
+
return
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
12
19
|
def decode_jwt
|
|
13
20
|
out = JWT.decode params[:jwt_token], nil, false
|
|
14
21
|
email = out[0]['email']
|
data/app/models/wco/tag.rb
CHANGED
|
@@ -35,6 +35,16 @@ class Wco::Tag
|
|
|
35
35
|
find_or_create_by({ slug: BOUNCE })
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
BOUNCED = 'bounced'
|
|
39
|
+
def self.bounced
|
|
40
|
+
find_or_create_by({ slug: BOUNCED })
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
DONOTSEND = 'donotsend'
|
|
44
|
+
def self.donotsend
|
|
45
|
+
find_or_create_by({ slug: DONOTSEND })
|
|
46
|
+
end
|
|
47
|
+
|
|
38
48
|
INBOX = 'inbox'
|
|
39
49
|
def self.inbox
|
|
40
50
|
find_or_create_by({ slug: INBOX })
|
|
@@ -55,10 +65,6 @@ class Wco::Tag
|
|
|
55
65
|
find_or_create_by({ slug: TRASH })
|
|
56
66
|
end
|
|
57
67
|
|
|
58
|
-
DONOTSEND = 'donotsend'
|
|
59
|
-
def self.donotsend
|
|
60
|
-
find_or_create_by({ slug: DONOTSEND })
|
|
61
|
-
end
|
|
62
68
|
|
|
63
69
|
def to_s
|
|
64
70
|
slug
|
data/config/routes.rb
CHANGED
|
@@ -6,8 +6,10 @@ Wco::Engine.routes.draw do
|
|
|
6
6
|
|
|
7
7
|
namespace :api do
|
|
8
8
|
get 'leads', to: 'leads#index'
|
|
9
|
+
get 'leads/by-email/:email', to: 'leads#by_email', constraints: { email: /[^\/]+/ }
|
|
9
10
|
get 'leads/index_hash', to: 'leads#index_hash'
|
|
10
11
|
|
|
12
|
+
|
|
11
13
|
get 'obf', to: 'obfuscated_redirects#show' ## testing only.
|
|
12
14
|
get 'obf/:id', to: 'obfuscared_redirects#show'
|
|
13
15
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wco_models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.0.
|
|
4
|
+
version: 3.1.0.299
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Victor Pudeyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-s3
|
|
@@ -545,6 +545,7 @@ files:
|
|
|
545
545
|
- app/views/wco/_search.haml
|
|
546
546
|
- app/views/wco/_select_all.haml
|
|
547
547
|
- app/views/wco/_sidebar.haml
|
|
548
|
+
- app/views/wco/api/leads/by_email.jbuilder
|
|
548
549
|
- app/views/wco/api/leads/index.jbuilder
|
|
549
550
|
- app/views/wco/api/leads/index_hash.jbuilder
|
|
550
551
|
- app/views/wco/api/tags/index.json.jbuilder
|