fix: correct billing feature-store API paths and loyalty config
Some checks failed
CI / ruff (push) Successful in 9s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled

Fix feature-store.js calling /store/features/available instead of
/store/billing/features/available (missing module prefix caused 404).
Also handle platform-prefixed URLs in getStoreCode().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 22:01:03 +01:00
parent a6e6d9be8e
commit 81cf84ed28
2 changed files with 9 additions and 3 deletions

View File

@@ -88,7 +88,7 @@
this.error = null;
// Fetch available features (lightweight endpoint)
const response = await apiClient.get('/store/features/available');
const response = await apiClient.get('/store/billing/features/available');
this.features = response.features || [];
this.tierCode = response.tier_code;
@@ -116,7 +116,7 @@
if (!storeCode) return;
try {
const response = await apiClient.get('/store/features');
const response = await apiClient.get('/store/billing/features');
// Build map for quick lookup
this.featuresMap = {};
@@ -184,9 +184,15 @@
getStoreCode() {
const path = window.location.pathname;
const segments = path.split('/').filter(Boolean);
// Direct: /store/{code}/...
if (segments[0] === 'store' && segments[1]) {
return segments[1];
}
// Platform-prefixed: /platforms/{platform}/store/{code}/...
const storeIdx = segments.indexOf('store');
if (storeIdx !== -1 && segments[storeIdx + 1]) {
return segments[storeIdx + 1];
}
return null;
},

View File

@@ -43,7 +43,7 @@ class ModuleConfig(BaseSettings):
# QR code settings
qr_code_size: int = 300 # pixels
model_config = {"env_prefix": "LOYALTY_"}
model_config = {"env_prefix": "LOYALTY_", "env_file": ".env", "extra": "ignore"}
# Export for auto-discovery