From 8ccf3d9f8e3001f5e101fd62d4410cb8941d35fb Mon Sep 17 00:00:00 2001 From: juancarmore Date: Wed, 27 Aug 2025 20:43:06 +0200 Subject: [PATCH] backend: rename updateParticipant to updateParticipantRole and adjust route to PUT method --- .../src/controllers/participant.controller.ts | 2 +- backend/src/routes/meeting.routes.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/src/controllers/participant.controller.ts b/backend/src/controllers/participant.controller.ts index f0b01a3..6abbc63 100644 --- a/backend/src/controllers/participant.controller.ts +++ b/backend/src/controllers/participant.controller.ts @@ -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 participantService = container.get(ParticipantService); const { roomId, participantIdentity } = req.params; diff --git a/backend/src/routes/meeting.routes.ts b/backend/src/routes/meeting.routes.ts index f2f9b7b..dc71b75 100644 --- a/backend/src/routes/meeting.routes.ts +++ b/backend/src/routes/meeting.routes.ts @@ -22,14 +22,6 @@ internalMeetingRouter.delete( withModeratorPermissions, meetingCtrl.endMeeting ); -internalMeetingRouter.patch( - '/:roomId/participants/:participantIdentity', - withAuth(participantTokenValidator), - withValidRoomId, - withModeratorPermissions, - validateUpdateParticipantRequest, - participantCtrl.updateParticipant -); internalMeetingRouter.delete( '/:roomId/participants/:participantIdentity', withAuth(participantTokenValidator), @@ -37,3 +29,11 @@ internalMeetingRouter.delete( withModeratorPermissions, participantCtrl.deleteParticipant ); +internalMeetingRouter.put( + '/:roomId/participants/:participantIdentity/role', + withAuth(participantTokenValidator), + withValidRoomId, + withModeratorPermissions, + validateUpdateParticipantRequest, + participantCtrl.updateParticipantRole +);