Class: CommandTower::Me::PhoneVerification::VerifyController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- CommandTower::Me::PhoneVerification::VerifyController
- Defined in:
- app/controllers/command_tower/me/phone_verification/verify_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
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/command_tower/me/phone_verification/verify_controller.rb', line 13 def create deserialized = CommandTower::Deserializers::Me::PhoneVerification::VerifyDeserializer.call(params) unless deserialized.success? return render_application_result( CommandTower::Workflows::WorkflowResult.failure( errors: [CommandTower::Errors::Account::PhoneVerificationCodeInvalidError.new], http_status: :unprocessable_entity ) ) end result = CommandTower::Workflows::Me::PhoneVerification::VerifyWorkflow.call( current_user: current_user, code: deserialized.input.code, auth_context: current_auth_context ) render_application_result(result) end |