Class: Spree::Api::V2::Storefront::UserContactsController

Inherits:
ResourceController
  • Object
show all
Defined in:
app/controllers/spree/api/v2/storefront/user_contacts_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/spree/api/v2/storefront/user_contacts_controller.rb', line 6

def update
  options = user_with_pin_code_params

  generator_context = ::SpreeCmCommissioner::UserContactUpdater.call(options)

  if generator_context.success?
    # head :ok
    render_serialized_payload { serialize_resource(generator_context.user) }
  else
    render_error_payload(generator_context.message)
  end
end