Class: CommandTower::Me::InboxController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- CommandTower::Me::InboxController
- Defined in:
- app/controllers/command_tower/me/inbox_controller.rb
Constant Summary
Constants inherited from ApplicationController
ApplicationController::AUTHENTICATION_EXPIRE_HEADER, ApplicationController::AUTHENTICATION_HEADER, ApplicationController::AUTHENTICATION_WITH_RESET
Instance Method Summary collapse
- #archive ⇒ Object
- #bulk_archive ⇒ Object
- #bulk_delete ⇒ Object
- #bulk_read ⇒ Object
- #bulk_restore ⇒ Object
- #bulk_unread ⇒ Object
- #destroy ⇒ Object
- #index ⇒ Object
- #open ⇒ Object
- #show ⇒ Object
- #unread_count ⇒ Object
Methods inherited from ApplicationController
#authenticate_user!, #authenticate_user_without_email_verification!, #authorize_user!, #current_user, #safe_boolean
Instance Method Details
#archive ⇒ Object
29 30 31 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 29 def archive run_item_workflow(CommandTower::Workflows::Messaging::Inbox::ArchiveWorkflow) end |
#bulk_archive ⇒ Object
49 50 51 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 49 def bulk_archive run_bulk_workflow(CommandTower::Workflows::Messaging::Inbox::BulkArchiveWorkflow) end |
#bulk_delete ⇒ Object
57 58 59 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 57 def bulk_delete run_bulk_workflow(CommandTower::Workflows::Messaging::Inbox::BulkDeleteWorkflow) end |
#bulk_read ⇒ Object
41 42 43 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 41 def bulk_read run_bulk_workflow(CommandTower::Workflows::Messaging::Inbox::BulkReadWorkflow) end |
#bulk_restore ⇒ Object
53 54 55 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 53 def bulk_restore run_bulk_workflow(CommandTower::Workflows::Messaging::Inbox::BulkRestoreWorkflow) end |
#bulk_unread ⇒ Object
45 46 47 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 45 def bulk_unread run_bulk_workflow(CommandTower::Workflows::Messaging::Inbox::BulkUnreadWorkflow) end |
#destroy ⇒ Object
33 34 35 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 33 def destroy run_item_workflow(CommandTower::Workflows::Messaging::Inbox::DeleteWorkflow) end |
#index ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 12 def index deserialized = CommandTower::Deserializers::Messaging::Inbox::ListDeserializer.call(params) return render_deserializer_errors unless deserialized.success? render_application_result(CommandTower::Workflows::Messaging::Inbox::ListWorkflow.call( user: current_user, limit: deserialized.input.limit, offset: deserialized.input.offset, scope: deserialized.input.scope )) end |
#open ⇒ Object
25 26 27 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 25 def open run_item_workflow(CommandTower::Workflows::Messaging::Inbox::OpenWorkflow) end |
#show ⇒ Object
21 22 23 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 21 def show run_item_workflow(CommandTower::Workflows::Messaging::Inbox::ShowWorkflow) end |
#unread_count ⇒ Object
37 38 39 |
# File 'app/controllers/command_tower/me/inbox_controller.rb', line 37 def unread_count render_application_result(CommandTower::Workflows::Messaging::Inbox::UnreadCountWorkflow.call(user: current_user)) end |