Class: CommandTower::Me::PushoverController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- CommandTower::Me::PushoverController
- Defined in:
- app/controllers/command_tower/me/pushover_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
#create ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/command_tower/me/pushover_controller.rb', line 20 def create deserialized = CommandTower::Deserializers::Me::Pushover::CredentialsDeserializer.call(params) return render_deserializer_errors unless deserialized.success? result = CommandTower::Workflows::Me::Pushover::CreateWorkflow.call( current_user: current_user, user_key: deserialized.input.user_key, application_token: deserialized.input.application_token, auth_context: current_auth_context ) render_application_result(result) end |
#destroy ⇒ Object
46 47 48 49 50 51 52 |
# File 'app/controllers/command_tower/me/pushover_controller.rb', line 46 def destroy result = CommandTower::Workflows::Me::Pushover::DestroyWorkflow.call( current_user: current_user, auth_context: current_auth_context ) render_application_result(result) end |
#show ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/controllers/command_tower/me/pushover_controller.rb', line 12 def show result = CommandTower::Workflows::Me::Pushover::ShowWorkflow.call( current_user: current_user, auth_context: current_auth_context ) render_application_result(result) end |
#update ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'app/controllers/command_tower/me/pushover_controller.rb', line 33 def update deserialized = CommandTower::Deserializers::Me::Pushover::CredentialsDeserializer.call(params) return render_deserializer_errors unless deserialized.success? result = CommandTower::Workflows::Me::Pushover::ReplaceWorkflow.call( current_user: current_user, user_key: deserialized.input.user_key, application_token: deserialized.input.application_token, auth_context: current_auth_context ) render_application_result(result) end |