Class: Spree::Api::V3::Store::WishlistsController
- Inherits:
-
ResourceController
- Object
- ActionController::API
- BaseController
- ResourceController
- ResourceController
- Spree::Api::V3::Store::WishlistsController
- Defined in:
- app/controllers/spree/api/v3/store/wishlists_controller.rb
Constant Summary
Constants inherited from BaseController
BaseController::RATE_LIMIT_RESPONSE
Constants included from Idempotent
Idempotent::IDEMPOTENCY_HEADER, Idempotent::IDEMPOTENCY_TTL, Idempotent::MAX_KEY_LENGTH, Idempotent::MUTATING_METHODS
Constants included from ErrorHandler
Constants included from JwtAuthentication
JwtAuthentication::JWT_AUDIENCE_ADMIN, JwtAuthentication::JWT_AUDIENCE_STORE, JwtAuthentication::JWT_ISSUER, JwtAuthentication::USER_TYPE_ADMIN, JwtAuthentication::USER_TYPE_CUSTOMER
Instance Method Summary collapse
-
#create ⇒ Object
POST /api/v3/store/wishlists.
Methods inherited from ResourceController
#destroy, #index, #show, #update
Methods included from ApiKeyAuthentication
#authenticate_api_key!, #authenticate_secret_key!
Methods included from JwtAuthentication
#authenticate_user, #require_authentication!
Instance Method Details
#create ⇒ Object
POST /api/v3/store/wishlists
9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/spree/api/v3/store/wishlists_controller.rb', line 9 def create @resource = current_user.wishlists.build(permitted_params) @resource.store = current_store if @resource.save render json: serialize_resource(@resource), status: :created else render_errors(@resource.errors) end end |