Add subcription feature 3
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user