backend: rename updateParticipant to updateParticipantRole and adjust route to PUT method

This commit is contained in:
juancarmore 2025-08-27 20:43:06 +02:00
parent 1adce0f424
commit 8ccf3d9f8e
2 changed files with 9 additions and 9 deletions

View File

@ -98,7 +98,7 @@ export const refreshParticipantToken = async (req: Request, res: Response) => {
} }
}; };
export const updateParticipant = async (req: Request, res: Response) => { export const updateParticipantRole = async (req: Request, res: Response) => {
const logger = container.get(LoggerService); const logger = container.get(LoggerService);
const participantService = container.get(ParticipantService); const participantService = container.get(ParticipantService);
const { roomId, participantIdentity } = req.params; const { roomId, participantIdentity } = req.params;

View File

@ -22,14 +22,6 @@ internalMeetingRouter.delete(
withModeratorPermissions, withModeratorPermissions,
meetingCtrl.endMeeting meetingCtrl.endMeeting
); );
internalMeetingRouter.patch(
'/:roomId/participants/:participantIdentity',
withAuth(participantTokenValidator),
withValidRoomId,
withModeratorPermissions,
validateUpdateParticipantRequest,
participantCtrl.updateParticipant
);
internalMeetingRouter.delete( internalMeetingRouter.delete(
'/:roomId/participants/:participantIdentity', '/:roomId/participants/:participantIdentity',
withAuth(participantTokenValidator), withAuth(participantTokenValidator),
@ -37,3 +29,11 @@ internalMeetingRouter.delete(
withModeratorPermissions, withModeratorPermissions,
participantCtrl.deleteParticipant participantCtrl.deleteParticipant
); );
internalMeetingRouter.put(
'/:roomId/participants/:participantIdentity/role',
withAuth(participantTokenValidator),
withValidRoomId,
withModeratorPermissions,
validateUpdateParticipantRequest,
participantCtrl.updateParticipantRole
);