Class: Spree::Api::V2::Storefront::Account::RecipientsController
- Inherits:
-
ResourceController
- Object
- ResourceController
- Spree::Api::V2::Storefront::Account::RecipientsController
- Defined in:
- app/controllers/spree/api/v2/storefront/account/recipients_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/spree/api/v2/storefront/account/recipients_controller.rb', line 9 def show identifier = params[:q].to_s.strip return render_error_payload('Missing q parameter', 400) if identifier.blank? user = SpreeCmCommissioner::RecipientSearcherQuery.new(identifier, MultiTenant.current_tenant_id).call if user render_serialized_payload { serialize_resource(user) } else render_error_payload('User not found', 404) end end |