ishapi 0.1.8.266 → 0.1.8.267

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: 833283278eccda017d3d8af0fcaff21a3b89d5f408f3640d85a061a4cc79753b
4
- data.tar.gz: 39ba1400e727a379f9811ef1baaedc3baf6976cebe79f248fb7f4b9c52b62b6e
3
+ metadata.gz: d9fe7f657a535734b42afe4664280c3991898a6bfff798f9481f16ddad82a13b
4
+ data.tar.gz: dfaaba6bbdb613b2ebbf29fab8be7a1abbc67d146b05c08818745dfa4ecb942e
5
5
  SHA512:
6
- metadata.gz: 85f0662bf4c7f5adf0518dae52a41c11585d2cbecc1fd27553c823fa23b0f6d30b246d52e512cb54eb5c0b1f598c836bf8f40d267986080ffde1d9d857f37ae9
7
- data.tar.gz: 853e067daaed10e499a8a1aaaa582216c7ed1a24eb478b7014467cf6db2bc6a5dd91e823a471d4aa915582c9747d88f81ffc5e4016ccef7f4a66e9cb877db8bc
6
+ metadata.gz: 1a2edb2bd8633da8579d7df26ba54453d6aef2da51a32164d2cb0ce3f04c37ccb7f624fa4395b5a4f7d67ebe6de2f632eb0259b4c72dbbae325bb4bd09a97f20
7
+ data.tar.gz: 0ac48eea6494d7b4d20a8d76fe64d07c937b861cc0682b057dd4b0f486d02138fcbd7dd19f12951a11557197ceeb2e81e1a813b0660a487e7b58423853896775
@@ -87,6 +87,7 @@ class ::Ishapi::ApplicationController < ActionController::Base
87
87
  def check_jwt
88
88
  begin
89
89
  decoded = decode(params[:jwt_token])
90
+ puts! decoded, 'decoded'
90
91
  @current_profile = Ish::UserProfile.find decoded['user_profile_id']
91
92
  rescue JWT::ExpiredSignature
92
93
  Rails.logger.info("JWT::ExpiredSignature")
@@ -0,0 +1,28 @@
1
+
2
+ require_dependency "ishapi/application_controller"
3
+
4
+ # gem_dir = Gem::Specification.find_by_name("ish_models").gem_dir
5
+ # require "#{gem_dir}/lib/office/email_conversation"
6
+
7
+ module Ishapi
8
+ class EmailContextsController < ApplicationController
9
+
10
+ before_action :check_jwt
11
+
12
+ def summary
13
+ authorize! :summary, Ish::EmailContext
14
+ @results = Ish::EmailContext.summary
15
+
16
+ respond_to do |format|
17
+ format.html
18
+ format.csv do
19
+ render layout: false
20
+ end
21
+ format.json do
22
+ render json: @results
23
+ end
24
+ end
25
+ end
26
+
27
+ end
28
+ end
@@ -35,6 +35,7 @@ class Ishapi::Ability
35
35
  if %w| victor@wasya.co victor@piousbox.com piousbox@gmail.com |.include?( user_profile.email )
36
36
 
37
37
  can [ :manage ], ::Ishapi
38
+ can [ :manage ], ::Ish::EmailContext
38
39
 
39
40
  can [ :show ], ::Office::EmailMessage
40
41
  end
@@ -0,0 +1,4 @@
1
+ <%= CSV.generate_line ['date', 'count'] -%>
2
+ <%- @results.each do |result| -%>
3
+ <%= CSV.generate_line [ result['_id'], result['total'] ] -%>
4
+ <%- end -%>
data/config/routes.rb CHANGED
@@ -8,6 +8,8 @@ Ishapi::Engine.routes.draw do
8
8
  post 'email_messages', to: 'email_messages#receive'
9
9
  get 'email_messages/:id', to: 'email_messages#show', as: :email_message
10
10
 
11
+ get 'email_contexts/summary', to: 'email_contexts#summary'
12
+
11
13
  delete 'email_conversations', to: 'email_conversations#delete'
12
14
  post 'email_conversations/rmtag/:emailtag', to: 'email_conversations#rmtag'
13
15
 
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.266
4
+ version: 0.1.8.267
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-13 00:00:00.000000000 Z
11
+ date: 2023-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -209,6 +209,7 @@ files:
209
209
  - app/assets/stylesheets/ishapi/locations.scss
210
210
  - app/assets/stylesheets/scaffold.css
211
211
  - app/controllers/ishapi/application_controller.rb
212
+ - app/controllers/ishapi/email_contexts_controller.rb
212
213
  - app/controllers/ishapi/email_conversations_controller.rb
213
214
  - app/controllers/ishapi/email_messages_controller.rb
214
215
  - app/controllers/ishapi/galleries_controller.rb
@@ -242,6 +243,7 @@ files:
242
243
  - app/views/ishapi/application/_meta.jbuilder
243
244
  - app/views/ishapi/application/_pagination.jbuilder
244
245
  - app/views/ishapi/application_mailer/forwarder_notify.html.erb
246
+ - app/views/ishapi/email_contexts/summary.csv.erb
245
247
  - app/views/ishapi/email_messages/show.haml
246
248
  - app/views/ishapi/galleries/_index.jbuilder
247
249
  - app/views/ishapi/galleries/_show.jbuilder