ishapi 0.1.8.296 → 0.1.8.297

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: 9aadcd60851b4155d5692ed824345f159f0b0cc419bff9c7ae98fff5d786dbb0
4
- data.tar.gz: e16ec2b4fef36f3429c6ad3db888e32a601a79840cbdf62aef22a81c03a7df9e
3
+ metadata.gz: ece2520c7fc910a90b9ebb698ba4e4ce1ba79e865eb95c9ab9bbb1738d80f6e2
4
+ data.tar.gz: f31ea9aecf4eccabd73a7fdfa34dc3ac11c2e90a1bbe35ee110e8e6c56012b36
5
5
  SHA512:
6
- metadata.gz: 275a4f20802fd724a2c9ca0bed415dda0642dbde4ab20e07baff3757a3702e447f39c6118d10798910f6a808cfdb8a434104e72450d9c550d888f1bc054c7402
7
- data.tar.gz: ad1241027783f12ae4dd80b861f003987e60850ca4f477635e56314e919e59aec94d2335613c3af7de107f18f27f384068210ade056cd749c06265236f348ab5
6
+ metadata.gz: aea4023e00b834221259479c57d7e2fa7c1ffd9ab7c4652b4681bf66acb423ae5173400cca4f8b33800b40b50cf758d4118136c2f26255cd9ac809e4120fd693
7
+ data.tar.gz: 2352269df1354b9b04e4c9eac6a2daaef79c7d06a9132afc6e4166a727185b2b50b093713c29d4ea08408532b0ad7defc35b4342d83242457afd56f90e690a55
@@ -9,11 +9,21 @@ module Ishapi
9
9
 
10
10
  before_action :check_jwt
11
11
 
12
+ def addtag
13
+ authorize! :email_conversations_addtag, ::Ishapi
14
+ convos = Office::EmailConversation.find params[:ids]
15
+ outs = convos.map do |convo|
16
+ convo.add_tag( params[:emailtag] )
17
+ end
18
+ flash[:notice] = "outcome: #{outs}"
19
+ render json: { status: :ok }
20
+ end
21
+
12
22
  def rmtag
13
- authorize! :email_conversations_rmtag, ::Ishapi
23
+ authorize! :email_conversations_addtag, ::Ishapi
14
24
  convos = Office::EmailConversation.find params[:ids]
15
25
  outs = convos.map do |convo|
16
- convo.rmtag( params[:emailtag] )
26
+ convo.remove_tag( params[:emailtag] )
17
27
  end
18
28
  flash[:notice] = "outcome: #{outs}"
19
29
  render json: { status: :ok }
data/config/routes.rb CHANGED
@@ -11,8 +11,11 @@ Ishapi::Engine.routes.draw do
11
11
 
12
12
  get 'email_contexts/summary', to: 'email_contexts#summary'
13
13
 
14
- delete 'email_conversations', to: 'email_conversations#delete'
15
- post 'email_conversations/rmtag/:emailtag', to: 'email_conversations#rmtag'
14
+ delete 'email_conversations', to: 'email_conversations#delete'
15
+ post 'email_conversations/addtag', to: 'email_conversations#addtag'
16
+ post 'email_conversations/addtag/:emailtag', to: 'email_conversations#addtag'
17
+ post 'email_conversations/rmtag', to: 'email_conversations#rmtag'
18
+ post 'email_conversations/rmtag/:emailtag', to: 'email_conversations#rmtag'
16
19
 
17
20
  get 'email_unsubscribes', to: 'email_unsubscribes#create'
18
21
 
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.296
4
+ version: 0.1.8.297
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-27 00:00:00.000000000 Z
11
+ date: 2023-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails