Class: CommandTower::Admin::Users::IdentitiesController
- Inherits:
-
ApplicationController
- Object
- CommandTower::ApplicationController
- ApplicationController
- CommandTower::Admin::Users::IdentitiesController
- Defined in:
- app/controllers/command_tower/admin/users/identities_controller.rb
Instance Method Summary collapse
- #update_email ⇒ Object
- #update_email_validation ⇒ Object
- #update_name ⇒ Object
- #update_username ⇒ Object
Instance Method Details
#update_email ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'app/controllers/command_tower/admin/users/identities_controller.rb', line 36 def update_email deserialized = CommandTower::Deserializers::Admin::Users::UpdateEmailDeserializer.call(params) return render_deserializer_errors unless deserialized.success? render_application_result( CommandTower::Workflows::Admin::Users::UpdateEmailWorkflow.call( id: deserialized.input.id, user: current_user, email: deserialized.input.email, scope_value: deserialized.input.scope_value ) ) end |
#update_email_validation ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'app/controllers/command_tower/admin/users/identities_controller.rb', line 50 def update_email_validation deserialized = CommandTower::Deserializers::Admin::Users::UpdateEmailValidationDeserializer.call(params) return render_deserializer_errors unless deserialized.success? render_application_result( CommandTower::Workflows::Admin::Users::SetEmailValidatedWorkflow.call( id: deserialized.input.id, user: current_user, email_validated: deserialized.input.email_validated, scope_value: deserialized.input.scope_value ) ) end |
#update_name ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/command_tower/admin/users/identities_controller.rb', line 7 def update_name deserialized = CommandTower::Deserializers::Admin::Users::UpdateNameDeserializer.call(params) return render_deserializer_errors unless deserialized.success? render_application_result( CommandTower::Workflows::Admin::Users::UpdateNameWorkflow.call( id: deserialized.input.id, user: current_user, first_name: deserialized.input.first_name, last_name: deserialized.input.last_name, scope_value: deserialized.input.scope_value ) ) end |
#update_username ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/command_tower/admin/users/identities_controller.rb', line 22 def update_username deserialized = CommandTower::Deserializers::Admin::Users::UpdateUsernameDeserializer.call(params) return render_deserializer_errors unless deserialized.success? render_application_result( CommandTower::Workflows::Admin::Users::UpdateUsernameWorkflow.call( id: deserialized.input.id, user: current_user, username: deserialized.input.username, scope_value: deserialized.input.scope_value ) ) end |