refactor: rename public routes and templates to platform
Complete the public -> platform naming migration across the codebase. This aligns with the naming convention where "platform" refers to the marketing/public-facing pages of the platform itself. Changes: - Update all imports from public to platform modules - Update template references from public/ to platform/ - Update route registrations to use platform prefix - Update documentation to reflect new naming - Update test files for platform API endpoints Files affected: - app/api/main.py - router imports - app/modules/*/routes/*/platform.py - route definitions - app/modules/*/templates/*/platform/ - template files - app/modules/routes.py - route discovery - docs/* - documentation updates - tests/integration/api/v1/platform/ - test files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# app/modules/marketplace/routes/api/public.py
|
||||
# app/modules/marketplace/routes/api/platform.py
|
||||
"""
|
||||
Public Letzshop vendor lookup API endpoints.
|
||||
Platform Letzshop vendor lookup API endpoints.
|
||||
|
||||
Allows potential vendors to find themselves in the Letzshop marketplace
|
||||
and claim their shop during signup.
|
||||
|
||||
All endpoints are public (no authentication required).
|
||||
All endpoints are unauthenticated (no authentication required).
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# app/modules/marketplace/routes/pages/public.py
|
||||
# app/modules/marketplace/routes/pages/platform.py
|
||||
"""
|
||||
Marketplace Public Page Routes (HTML rendering).
|
||||
Marketplace Platform Page Routes (HTML rendering).
|
||||
|
||||
Public (unauthenticated) pages:
|
||||
Platform (unauthenticated) pages:
|
||||
- Find shop (Letzshop vendor browser)
|
||||
"""
|
||||
|
||||
@@ -11,7 +11,7 @@ from fastapi.responses import HTMLResponse
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.core.database import get_db
|
||||
from app.modules.core.utils.page_context import get_public_context
|
||||
from app.modules.core.utils.page_context import get_platform_context
|
||||
from app.templates_config import templates
|
||||
|
||||
router = APIRouter()
|
||||
@@ -32,10 +32,10 @@ async def find_shop_page(
|
||||
|
||||
Allows vendors to search for and claim their Letzshop shop.
|
||||
"""
|
||||
context = get_public_context(request, db)
|
||||
context = get_platform_context(request, db)
|
||||
context["page_title"] = "Find Your Letzshop Shop"
|
||||
|
||||
return templates.TemplateResponse(
|
||||
"marketplace/public/find-shop.html",
|
||||
"marketplace/platform/find-shop.html",
|
||||
context,
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{# app/modules/marketplace/templates/marketplace/public/find-shop.html #}
|
||||
{# Letzshop Vendor Finder Page #}
|
||||
{% extends "public/base.html" %}
|
||||
{% extends "platform/base.html" %}
|
||||
|
||||
{% block title %}{{ _("cms.platform.find_shop.title") }} - Wizamart{% endblock %}
|
||||
|
||||
@@ -151,7 +151,7 @@ function vendorFinderData() {
|
||||
this.result = null;
|
||||
|
||||
try {
|
||||
const response = await fetch('/api/v1/public/letzshop-vendors/lookup', {
|
||||
const response = await fetch('/api/v1/platform/letzshop-vendors/lookup', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ url: this.searchQuery })
|
||||
|
||||
Reference in New Issue
Block a user