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:
2026-03-12 09:04:04 -04:00
parent a62e4062a2
commit b754f0ddce
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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);