mirror of
https://github.com/joaovitoriasilva/endurain.git
synced 2026-01-10 08:17:59 -05:00
Replaces websocket.schema with websocket.manager for managing WebSocket connections, introducing a singleton WebSocketManager and updating all imports and usages accordingly. Adds token-based authentication for WebSocket connections, requiring access_token as a query parameter and validating it server-side. Updates FastAPI WebSocket endpoint to use authenticated user ID, and modifies frontend to connect using the access token. Removes obsolete schema.py and improves error handling and logging for WebSocket events.
11 lines
276 B
Python
11 lines
276 B
Python
"""WebSocket module for real-time notifications and communication."""
|
|
|
|
from websocket.manager import WebSocketManager, get_websocket_manager
|
|
from websocket.utils import notify_frontend
|
|
|
|
__all__ = [
|
|
"WebSocketManager",
|
|
"get_websocket_manager",
|
|
"notify_frontend",
|
|
]
|