Add subcription feature 3

This commit is contained in:
Urtzi Alfaro
2026-01-15 20:45:49 +01:00
parent a4c3b7da3f
commit b674708a4c
83 changed files with 9451 additions and 6828 deletions

View File

@@ -88,11 +88,11 @@ export const SSEProvider: React.FC<SSEProviderProps> = ({ children }) => {
let sseUrl: string;
if (isDemoMode && demoSessionId) {
// For demo mode, use demo_session_id instead of token
sseUrl = `${protocol}//${host}/api/events?demo_session_id=${encodeURIComponent(demoSessionId)}&tenant_id=${currentTenant.id}`;
sseUrl = `${protocol}//${host}/api/v1/events?demo_session_id=${encodeURIComponent(demoSessionId)}&tenant_id=${currentTenant.id}`;
console.log('Connecting to SSE endpoint (demo mode):', sseUrl);
} else {
// For regular mode, use JWT token
sseUrl = `${protocol}//${host}/api/events?token=${encodeURIComponent(token!)}&tenant_id=${currentTenant.id}`;
sseUrl = `${protocol}//${host}/api/v1/events?token=${encodeURIComponent(token!)}&tenant_id=${currentTenant.id}`;
console.log('Connecting to SSE endpoint (regular mode):', sseUrl);
}