Add real-time booking collaboration via WebSocket
- Backend: /ws relay endpoint (@fastify/websocket) - Frontend: useHotelSocket hook with lock/unlock/booking events - Calendar: lock overlay with diagonal stripes shows other manager editing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import rateLimit from '@fastify/rate-limit'
|
||||
import { config } from './config'
|
||||
import './types' // side-effect: augments fastify types
|
||||
|
||||
import wsRoutes from './routes/ws'
|
||||
import authRoutes from './routes/auth'
|
||||
import hotelsRoutes from './routes/hotels'
|
||||
import roomsRoutes from './routes/rooms'
|
||||
@@ -62,6 +63,7 @@ export async function buildApp() {
|
||||
fastify.get('/health', async () => ({ status: 'ok', ts: new Date().toISOString() }))
|
||||
|
||||
// ── Routes ─────────────────────────────────────────────────────────────────
|
||||
await fastify.register(wsRoutes)
|
||||
await fastify.register(authRoutes)
|
||||
await fastify.register(hotelsRoutes)
|
||||
await fastify.register(roomsRoutes)
|
||||
|
||||
Reference in New Issue
Block a user