Class: Spree::Api::V3::Store::ChannelController

Inherits:
Store::BaseController
  • Object
show all
Defined in:
app/controllers/spree/api/v3/store/channel_controller.rb

Overview

Exposes the channel context the request resolved to (bound key → X-Spree-Channel header → store default) so a storefront can read its own identity and access posture. Deliberately a singular resource: the Store API never enumerates a store's channels — that would leak the existence of gated surfaces (wholesale, POS) to anyone holding the publishable key.

Instance Method Summary collapse

Instance Method Details

#showObject

GET /api/v3/store/channel



18
19
20
# File 'app/controllers/spree/api/v3/store/channel_controller.rb', line 18

def show
  render json: serialize_resource(current_channel)
end