backend: Correct route parameter syntax for meeting routes

This commit is contained in:
juancarmore 2025-04-12 14:15:51 +02:00
parent 5570b30686
commit 9fd9dd2404
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ export const configureTokenAuth = async (req: Request, res: Response, next: Next
};
export const withModeratorPermissions = async (req: Request, res: Response, next: NextFunction) => {
const roomId = req.query.roomId as string;
const { roomId } = req.params;
const payload = req.session?.tokenClaims;
if (!payload) {

View File

@ -10,13 +10,13 @@ internalMeetingRouter.use(bodyParser.json());
// Internal Meetings Routes
internalMeetingRouter.delete(
':roomId',
'/:roomId',
withAuth(participantTokenValidator),
withModeratorPermissions,
meetingCtrl.endMeeting
);
internalMeetingRouter.delete(
':roomId/participants/:participantName',
'/:roomId/participants/:participantName',
withAuth(participantTokenValidator),
withModeratorPermissions,
participantCtrl.deleteParticipant