Class: CommandTower::Me::PreferencesController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- CommandTower::Me::PreferencesController
- Defined in:
- app/controllers/command_tower/me/preferences_controller.rb
Constant Summary
Constants inherited from ApplicationController
ApplicationController::AUTHENTICATION_EXPIRE_HEADER, ApplicationController::AUTHENTICATION_HEADER, ApplicationController::AUTHENTICATION_WITH_RESET
Instance Method Summary collapse
Methods inherited from ApplicationController
#authenticate_user!, #authenticate_user_without_email_verification!, #authorize_user!, #current_user, #safe_boolean
Instance Method Details
#show ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/controllers/command_tower/me/preferences_controller.rb', line 12 def show deserialized = CommandTower::Deserializers::Messaging::Preferences::ShowDeserializer.call(params) return render_deserializer_errors unless deserialized.success? render_application_result( CommandTower::Workflows::Messaging::Preferences::ShowWorkflow.call(user: current_user) ) end |
#update ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/command_tower/me/preferences_controller.rb', line 21 def update deserialized = CommandTower::Deserializers::Messaging::Preferences::UpdateDeserializer.call(params) return render_deserializer_errors unless deserialized.success? render_application_result( CommandTower::Workflows::Messaging::Preferences::UpdateWorkflow.call( user: current_user, notification_type_key: deserialized.input.notification_type_key, preference_state: deserialized.input.preference_state, ) ) end |