backend: Rename livekitRouter to livekitWebhookRouter for clarity and consistency

This commit is contained in:
Carlos Santos 2025-03-24 10:58:47 +01:00
parent ddbc80b0e3
commit f089ad6e67
2 changed files with 7 additions and 7 deletions

View File

@ -1,9 +1,9 @@
import express, { Router } from 'express';
import { lkWebhookHandler } from '../controllers/livekit-webhook.controller.js';
const livekitRouter = Router();
const livekitWebhookRouter = Router();
livekitRouter.use(express.raw({ type: 'application/webhook+json' }));
livekitRouter.post('/', lkWebhookHandler);
livekitWebhookRouter.use(express.raw({ type: 'application/webhook+json' }));
livekitWebhookRouter.post('/', lkWebhookHandler);
export { livekitRouter };
export { livekitWebhookRouter };

View File

@ -13,7 +13,7 @@ import { openapiHtmlPath, indexHtmlPath, publicFilesPath, webcomponentBundlePath
import {
authRouter,
internalRecordingRouter,
livekitRouter,
livekitWebhookRouter,
preferencesRouter,
recordingRouter,
roomRouter
@ -53,8 +53,8 @@ const createApp = () => {
app.use(`${MEET_INTERNAL_API_BASE_PATH_V1}/recordings`, internalRecordingRouter);
app.use('/meet/health', (_req: Request, res: Response) => res.status(200).send('OK'));
app.use('/livekit/webhook', livekitRouter);
app.use('/meet/livekit/webhook', livekitRouter);
app.use('/livekit/webhook', livekitWebhookRouter);
app.use('/meet/livekit/webhook', livekitWebhookRouter);
// Serve OpenVidu Meet webcomponent bundle file
app.get('/meet/v1/openvidu-meet.js', (_req: Request, res: Response) => res.sendFile(webcomponentBundlePath));
// Serve OpenVidu Meet index.html file for all non-API routes