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) => {
|
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;
|
const payload = req.session?.tokenClaims;
|
||||||
|
|
||||||
if (!payload) {
|
if (!payload) {
|
||||||
|
|||||||
@ -10,13 +10,13 @@ internalMeetingRouter.use(bodyParser.json());
|
|||||||
|
|
||||||
// Internal Meetings Routes
|
// Internal Meetings Routes
|
||||||
internalMeetingRouter.delete(
|
internalMeetingRouter.delete(
|
||||||
':roomId',
|
'/:roomId',
|
||||||
withAuth(participantTokenValidator),
|
withAuth(participantTokenValidator),
|
||||||
withModeratorPermissions,
|
withModeratorPermissions,
|
||||||
meetingCtrl.endMeeting
|
meetingCtrl.endMeeting
|
||||||
);
|
);
|
||||||
internalMeetingRouter.delete(
|
internalMeetingRouter.delete(
|
||||||
':roomId/participants/:participantName',
|
'/:roomId/participants/:participantName',
|
||||||
withAuth(participantTokenValidator),
|
withAuth(participantTokenValidator),
|
||||||
withModeratorPermissions,
|
withModeratorPermissions,
|
||||||
participantCtrl.deleteParticipant
|
participantCtrl.deleteParticipant
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user