Class: Spree::Api::V2::Storefront::PinCodeOtpCheckersController
- Inherits:
-
ResourceController
- Object
- ResourceController
- Spree::Api::V2::Storefront::PinCodeOtpCheckersController
- Defined in:
- app/controllers/spree/api/v2/storefront/pin_code_otp_checkers_controller.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/spree/api/v2/storefront/pin_code_otp_checkers_controller.rb', line 6 def update = otp_attrs [:type] = 'SpreeCmCommissioner::PinCodeOtp' [:long_life_pin_code] = true context = SpreeCmCommissioner::PinCodeChecker.call() if context.success? render_serialized_payload { { status: 'ok' } } else render_error_payload(context., 400) end end |