Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Include `ActiveStorage::SetCurrent` module in API controllers (#12156)

Damian Legawiec87310ba11007
diff --git a/api/app/controllers/spree/api/v2/base_controller.rb b/api/app/controllers/spree/api/v2/base_controller.rb
index 144c6a8b4f..0597462953 100644
--- a/api/app/controllers/spree/api/v2/base_controller.rb
+++ b/api/app/controllers/spree/api/v2/base_controller.rb
@@ -2,6 +2,7 @@ module Spree
module Api
module V2
class BaseController < ActionController::API
+ include ActiveStorage::SetCurrent
include CanCan::ControllerAdditions
include Spree::Core::ControllerHelpers::StrongParameters
include Spree::Core::ControllerHelpers::Store