backend: Correct route parameter syntax for meeting routes
This commit is contained in:
parent
5570b30686
commit
9fd9dd2404
@ -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) {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user