refactor(websocket): migrate endpoint from /api/ws to /ws/sync
- Update WebSocket connection URL in admin.ts to use new /ws/sync endpoint - Update API documentation in bruno collection to reflect new WebSocket route - Standardizes WebSocket routing under /ws/ path prefix for better API organization This change improves API structure consistency and makes WebSocket endpoints more discoverable and manageable under a dedicated path hierarchy.
This commit is contained in:
@@ -119,7 +119,7 @@ docs:
|
||||
- **OPDS Feeds**: GET /opds/* - OPDS catalog for e-reader integration
|
||||
- **OPDS Acquisition**: GET /opds/acquisition/* - Download media items
|
||||
WebSocket (Real-time)
|
||||
- **WebSocket**: WS /api/ws - Real-time sync events (progress, notes, highlights)
|
||||
- **WebSocket**: WS /ws/sync - Real-time sync events (progress, notes, highlights)
|
||||
Collection Organization
|
||||
bruno/
|
||||
├── user/ # User authentication and profile
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ let scanPollInterval: ReturnType<typeof setInterval> | undefined = undefined;
|
||||
let scanWs: WebSocket | null = null;
|
||||
function connectScanWebSocket(): void {
|
||||
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
const wsUrl = `${protocol}//${window.location.host}/api/ws`;
|
||||
const wsUrl = `${protocol}//${window.location.host}/ws/sync`;
|
||||
|
||||
scanWs = new WebSocket(wsUrl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user