diff --git a/backend/src/middlewares/participant.middleware.ts b/backend/src/middlewares/participant.middleware.ts index b265c8b..46eb696 100644 --- a/backend/src/middlewares/participant.middleware.ts +++ b/backend/src/middlewares/participant.middleware.ts @@ -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) { diff --git a/backend/src/routes/meeting.routes.ts b/backend/src/routes/meeting.routes.ts index 6efe2cd..f1ffd0c 100644 --- a/backend/src/routes/meeting.routes.ts +++ b/backend/src/routes/meeting.routes.ts @@ -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