backend: rename updateParticipant to updateParticipantRole and adjust route to PUT method
This commit is contained in:
parent
1adce0f424
commit
8ccf3d9f8e
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user