wco_email 0.1.1.1 → 0.1.1.2

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: 4a1985e799658f10652a2d34d6167693efccf4d9bca51c3305b32a40fc85976d
4
- data.tar.gz: 67de1b81f2566d8bb44c4d280acfc3419b90a394192ff93e333df23efc356c2c
3
+ metadata.gz: 519477786578cc1b17741ead9c387714f3fee6fe6cf2367bd3745f882ba5d19d
4
+ data.tar.gz: 10b3c3ab693a31b64e7f3e4564b2b5bc478d44b100bd42ec5e89a1ec2b19cd3f
5
5
  SHA512:
6
- metadata.gz: b47cc3f76284603bd3fff8234e278bdd19e428bd65c2e78fdabd472ef88ba04ed6de94d5e79d5c0d260082dc8f29e902de758198ea45177e8c6c98cc7359bb73
7
- data.tar.gz: 1f5c5759e881be8811d1ae65660c0dbdf01e73cdeb123ac31fed4471a273c5937cdf17e065eb71db10a1b47f532f98832b475f402526b947ef619d91d6f06a99
6
+ metadata.gz: e99ad9638472676b4acce45784c61a8afb277e45616a52a1b3f4c38746a67469abeb9dcb65c9ca649a2a0848cf5d09ca2fd928eb5da80b81bfe5621cdb574cd9
7
+ data.tar.gz: ecec1b8132155b6cd8c4c9797449d5d936b52092b4e8cce0ffaba0426b15022ff3e2ce45912b3920cb97e1f4695fc476c73aaf26cecf6ab8f20fc802a9ee2b6b
@@ -0,0 +1,18 @@
1
+
2
+ class WcoEmail::ApiController < ActionController::Base
3
+
4
+ before_action :check_credentials
5
+
6
+ ##
7
+ ## private
8
+ ##
9
+ private
10
+
11
+ def check_credentials
12
+ if params[:secret] != AWS_SES_LAMBDA_SECRET
13
+ render status: 400, json: { status: 400 }
14
+ return
15
+ end
16
+ end
17
+
18
+ end
@@ -1,8 +1,18 @@
1
1
 
2
- class WcoEmail::MessagesController < WcoEmail::ApplicationController
2
+ class WcoEmail::MessagesController < WcoEmail::ApiController
3
3
 
4
4
  before_action :set_lists, except: %i| show_iframe |
5
5
 
6
+ def create_from_ses
7
+ stub = WcoEmail::MessageStub.create!({
8
+ bucket: params[:bucket],
9
+ object_key: params[:object_key],
10
+ })
11
+
12
+ WcoEmail::MessageIntakeJob.perform_async( stub.id.to_s )
13
+ render status: :ok, json: { status: :ok }
14
+ end
15
+
6
16
  def show
7
17
  @message = WcoEmail::Message.find params[:id]
8
18
  authorize! :show, @message
@@ -31,4 +31,4 @@
31
31
 
32
32
  - else
33
33
  -# = link_to 'i-src', context_iframe_path(@ctx), target: :_blank
34
- %iframe.h-500px{ src: email_context_iframe_path(@ctx), width: '100%', height: '100%' }
34
+ %iframe.h-500px{ src: context_iframe_path(@ctx), width: '100%', height: '100%' }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.1
4
+ version: 0.1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -300,6 +300,7 @@ files:
300
300
  - app/assets/stylesheets/wco_email/contexts.scss
301
301
  - app/assets/stylesheets/wco_email/conversations.scss
302
302
  - app/assets/stylesheets/wco_email/tags.scss
303
+ - app/controllers/wco_email/api_controller.rb
303
304
  - app/controllers/wco_email/application_controller.rb
304
305
  - app/controllers/wco_email/contexts_controller.rb
305
306
  - app/controllers/wco_email/conversations_controller.rb