ishapi 0.1.8.215 → 0.1.8.216
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: 7b4e60c93d07bd13c28c340d6b51321777dcac330990a03c82bb99d688a739a5
|
4
|
+
data.tar.gz: 8373154c3f3585cfb9f67ed53d0333f17ae6f2334ebe7942eb3de677ca8e9776
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec07c25202e7d248111642c1761d0e1a7f89fcb376edf8ffec62f0816748773a6e2e82ccc0d60df5c367da3bc422abcb4a6c257073f4a861eb72026388e9128b
|
7
|
+
data.tar.gz: baa34823abceb222b632f5295322aacedc61d0a72cd46f03aa4eec64fdcd19f8a0215444ccdfd503ead825d4d90e9a8fe35232b7633ac6cf6a993a76a85bad15
|
@@ -1,37 +1,35 @@
|
|
1
1
|
|
2
2
|
require_dependency "ishapi/application_controller"
|
3
3
|
|
4
|
-
|
5
|
-
class EmailMessagesController < ApplicationController
|
4
|
+
class ::Ishapi::EmailMessagesController < ::Ishapi::ApplicationController
|
6
5
|
|
7
|
-
|
6
|
+
before_action :check_jwt, only: [ :show ]
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
## From lambda, ses
|
18
|
-
def receive
|
19
|
-
if params[:secret] != AWS_SES_LAMBDA_SECRET
|
20
|
-
render status: 400, json: { status: 400 }
|
21
|
-
return
|
22
|
-
end
|
8
|
+
def show
|
9
|
+
msg = Office::EmailMessage.find( params[:id] )
|
10
|
+
authorize! :show, msg
|
11
|
+
render json: {
|
12
|
+
item: msg,
|
13
|
+
}
|
14
|
+
end
|
23
15
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
28
|
-
|
29
|
-
::Ishapi::EmailMessageIntakeJob.perform_later( msg.id.to_s )
|
30
|
-
render status: :ok, json: { status: :ok }
|
31
|
-
else
|
32
|
-
render status: 400, json: { status: 400 }
|
33
|
-
end
|
16
|
+
## From lambda, ses
|
17
|
+
def receive
|
18
|
+
if params[:secret] != AWS_SES_LAMBDA_SECRET
|
19
|
+
render status: 400, json: { status: 400 }
|
20
|
+
return
|
34
21
|
end
|
35
22
|
|
23
|
+
msg = Office::EmailMessageStub.new({
|
24
|
+
object_path: params[:object_path],
|
25
|
+
object_key: params[:object_key],
|
26
|
+
})
|
27
|
+
if msg.save
|
28
|
+
::Ishapi::EmailMessageIntakeJob.perform_later( msg.id.to_s )
|
29
|
+
render status: :ok, json: { status: :ok }
|
30
|
+
else
|
31
|
+
render status: 400, json: { status: 400 }
|
32
|
+
end
|
36
33
|
end
|
34
|
+
|
37
35
|
end
|
@@ -7,7 +7,7 @@ class Ishapi::Ability
|
|
7
7
|
#
|
8
8
|
# signed in user_profile
|
9
9
|
#
|
10
|
-
if
|
10
|
+
if user_profile.present?
|
11
11
|
|
12
12
|
can [ :my_index ], Gallery
|
13
13
|
can [ :show ], Gallery do |gallery|
|
@@ -29,13 +29,15 @@ class Ishapi::Ability
|
|
29
29
|
|
30
30
|
can [ :buy_stars ], ::Ish::UserProfile
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
##
|
33
|
+
## superuser
|
34
|
+
##
|
35
35
|
if %w| victor@wasya.co victor@piousbox.com piousbox@gmail.com |.include?( user_profile.email )
|
36
|
+
puts! user_profile, 'ze profile'
|
37
|
+
|
36
38
|
can [ :email_conversations_delete ], ::Ishapi
|
37
39
|
|
38
|
-
can [ :
|
40
|
+
can [ :show ], ::Office::EmailMessage
|
39
41
|
end
|
40
42
|
|
41
43
|
end
|
data/config/routes.rb
CHANGED
@@ -4,6 +4,7 @@ Ishapi::Engine.routes.draw do
|
|
4
4
|
root :to => 'application#home'
|
5
5
|
post 'home', :to => 'application#home'
|
6
6
|
|
7
|
+
|
7
8
|
resources :addresses
|
8
9
|
|
9
10
|
get 'galleries', :to => 'galleries#index'
|
@@ -54,7 +55,8 @@ Ishapi::Engine.routes.draw do
|
|
54
55
|
get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
|
55
56
|
|
56
57
|
|
57
|
-
get 'test',
|
58
|
+
get 'test', to: 'application#test'
|
59
|
+
get 'exception', to: 'application#exception'
|
58
60
|
|
59
61
|
post 'users/fb_sign_in', to: 'users#fb_sign_in'
|
60
62
|
get 'users/me', to: 'users#account'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.216
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|