refactor: remove legacy /shop and /api/v1/shop dead code
After the storefront migration, no live routes mount under /api/v1/shop/. Remove all dead code that detected/handled shop API requests: the is_shop_api_request() method, the shop API dispatch branch in middleware, the RequestContext.SHOP enum member (renamed to STOREFRONT), legacy path prefixes in FrontendDetector, and all associated tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,8 +46,6 @@ class FrontendDetector:
|
||||
STOREFRONT_PATH_PREFIXES = (
|
||||
"/storefront",
|
||||
"/api/v1/storefront",
|
||||
"/shop", # Legacy support
|
||||
"/api/v1/shop", # Legacy support
|
||||
"/stores/", # Path-based store access
|
||||
)
|
||||
MERCHANT_PATH_PREFIXES = ("/merchants", "/api/v1/merchants")
|
||||
@@ -113,7 +111,7 @@ class FrontendDetector:
|
||||
return FrontendType.PLATFORM
|
||||
|
||||
# 3. Store subdomain detection (wizamart.oms.lu)
|
||||
# If subdomain exists and is not reserved -> it's a store shop
|
||||
# If subdomain exists and is not reserved -> it's a store storefront
|
||||
if subdomain and subdomain not in cls.RESERVED_SUBDOMAINS:
|
||||
logger.debug(
|
||||
f"[FRONTEND_DETECTOR] Detected STOREFRONT from subdomain: {subdomain}"
|
||||
|
||||
Reference in New Issue
Block a user