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:
2026-02-13 13:16:43 +01:00
parent 874e254c11
commit 9173448645
10 changed files with 76 additions and 333 deletions

View File

@@ -26,7 +26,7 @@ from main import app
from tests.integration.middleware.middleware_test_routes import (
admin_router,
api_router,
shop_router,
storefront_router,
store_router,
)
from tests.integration.middleware.middleware_test_routes import (
@@ -39,7 +39,7 @@ if not any(r.path.startswith("/middleware-test") for r in app.routes if hasattr(
app.include_router(api_router)
app.include_router(admin_router)
app.include_router(store_router)
app.include_router(shop_router)
app.include_router(storefront_router)
@pytest.fixture