fix: store menu 404, logger crash, platform detection, and sidebar UX
All checks were successful
All checks were successful
- Fix store menu API URL (/store/menu/render/store, not /store/core/...) - Fix storeLog/merchantLog fallback to console object instead of console.log - Embed platform_id/platform_code in store JWT from URL context at login - Use token_platform_id in store menu endpoint with DB fallback for old tokens - Add "Menu unavailable" warning in sidebar fallback for all three frontends - Standardize admin section default to all-open (consistent with store/merchant) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -95,8 +95,10 @@ async def get_rendered_store_menu(
|
||||
# Get the store from the JWT token's store context
|
||||
store = store_service.get_store_by_id(db, current_user.token_store_id)
|
||||
|
||||
# Resolve the store's platform via service layer
|
||||
platform_id = menu_service.get_store_primary_platform_id(db, store.id)
|
||||
# Platform from JWT (set at login from URL context), fall back to DB for old tokens
|
||||
platform_id = current_user.token_platform_id
|
||||
if platform_id is None:
|
||||
platform_id = menu_service.get_store_primary_platform_id(db, store.id)
|
||||
|
||||
# Get filtered menu with platform visibility and store_code interpolation
|
||||
menu = menu_service.get_menu_for_rendering(
|
||||
|
||||
Reference in New Issue
Block a user