feat: implement real-time booking updates using Server-Sent Events (SSE) and add public booking URL sharing to the dashboard
This commit is contained in:
@@ -12,6 +12,7 @@ import { userRoutes } from '@/modules/user/user.routes';
|
||||
import type { AppEnv } from '@/types/hono';
|
||||
import type { Hono } from 'hono';
|
||||
import { serveStatic } from 'hono/bun';
|
||||
import { registerEventsRoutes } from './lib/sse';
|
||||
import { healthCheckRoutes } from './modules/health-check/health-check.routes';
|
||||
|
||||
export function registerRoutes(app: Hono<AppEnv>) {
|
||||
@@ -28,6 +29,8 @@ export function registerRoutes(app: Hono<AppEnv>) {
|
||||
.route('/api/admin-bookings', adminBookingRoutes)
|
||||
.route('/api/health', healthCheckRoutes);
|
||||
|
||||
registerEventsRoutes(app);
|
||||
|
||||
app.use('*', serveStatic({ root: './public' }));
|
||||
app.get('*', async (c) => {
|
||||
if (c.req.path === '/api' || c.req.path.startsWith('/api/')) {
|
||||
|
||||
Reference in New Issue
Block a user