diff --git a/backend/src/controllers/auth.controller.ts b/backend/src/controllers/auth.controller.ts index d86c94a..fc2f5fb 100644 --- a/backend/src/controllers/auth.controller.ts +++ b/backend/src/controllers/auth.controller.ts @@ -45,7 +45,7 @@ export const login = async (req: Request, res: Response) => { ) ); logger.info(`Login succeeded for user '${username}'`); - return res.status(200).json({ message: 'Login succeeded' }); + return res.status(200).json({ message: `User '${username}' logged in successfully` }); } catch (error) { handleError(res, error, 'generating token'); } @@ -98,8 +98,8 @@ export const refreshToken = async (req: Request, res: Response) => { accessToken, getCookieOptions('/', INTERNAL_CONFIG.ACCESS_TOKEN_EXPIRATION) ); - logger.info(`Token refreshed for user ${username}`); - return res.status(200).json({ message: 'Token refreshed' }); + logger.info(`Access token refreshed for user '${username}'`); + return res.status(200).json({ message: `Access token for user '${username}' successfully refreshed` }); } catch (error) { handleError(res, error, 'refreshing token'); } @@ -141,7 +141,7 @@ export const deleteApiKeys = async (_req: Request, res: Response) => { try { await authService.deleteApiKeys(); - return res.status(204).send(); + return res.status(200).json({ message: 'API keys deleted successfully' }); } catch (error) { handleError(res, error, 'deleting API keys'); } diff --git a/backend/src/controllers/meeting.controller.ts b/backend/src/controllers/meeting.controller.ts index 5fe248d..4e1f9c1 100644 --- a/backend/src/controllers/meeting.controller.ts +++ b/backend/src/controllers/meeting.controller.ts @@ -21,7 +21,7 @@ export const endMeeting = async (req: Request, res: Response) => { logger.info(`Ending meeting from room '${roomId}'`); // To end a meeting, we need to delete the room from LiveKit await livekitService.deleteRoom(roomId); - res.status(200).json({ message: 'Meeting ended successfully' }); + res.status(200).json({ message: `Meeting in room '${roomId}' ended successfully` }); } catch (error) { handleError(res, error, `ending meeting from room '${roomId}'`); } diff --git a/backend/src/controllers/participant.controller.ts b/backend/src/controllers/participant.controller.ts index abdd557..2ed3791 100644 --- a/backend/src/controllers/participant.controller.ts +++ b/backend/src/controllers/participant.controller.ts @@ -107,7 +107,7 @@ export const updateParticipantRole = async (req: Request, res: Response) => { } }; -export const deleteParticipant = async (req: Request, res: Response) => { +export const kickParticipant = async (req: Request, res: Response) => { const logger = container.get(LoggerService); const roomService = container.get(RoomService); const participantService = container.get(ParticipantService); @@ -121,10 +121,12 @@ export const deleteParticipant = async (req: Request, res: Response) => { } try { - logger.verbose(`Deleting participant '${participantIdentity}' from room '${roomId}'`); - await participantService.deleteParticipant(roomId, participantIdentity); - res.status(200).json({ message: 'Participant deleted' }); + logger.verbose(`Kicking participant '${participantIdentity}' from room '${roomId}'`); + await participantService.kickParticipant(roomId, participantIdentity); + res.status(200).json({ + message: `Participant '${participantIdentity}' kicked successfully from room '${roomId}'` + }); } catch (error) { - handleError(res, error, `deleting participant '${participantIdentity}' from room '${roomId}'`); + handleError(res, error, `kicking participant '${participantIdentity}' from room '${roomId}'`); } }; diff --git a/backend/src/controllers/recording.controller.ts b/backend/src/controllers/recording.controller.ts index bd56bfd..c4c911f 100644 --- a/backend/src/controllers/recording.controller.ts +++ b/backend/src/controllers/recording.controller.ts @@ -142,7 +142,7 @@ export const deleteRecording = async (req: Request, res: Response) => { try { await recordingService.deleteRecording(recordingId); - return res.status(204).send(); + return res.status(200).json({ message: `Recording '${recordingId}' deleted successfully` }); } catch (error) { handleError(res, error, `deleting recording '${recordingId}'`); } diff --git a/backend/src/controllers/user.controller.ts b/backend/src/controllers/user.controller.ts index f6717b1..3835597 100644 --- a/backend/src/controllers/user.controller.ts +++ b/backend/src/controllers/user.controller.ts @@ -29,7 +29,7 @@ export const changePassword = async (req: Request, res: Response) => { try { const userService = container.get(UserService); await userService.changePassword(user.username, currentPassword, newPassword); - return res.status(200).json({ message: 'Password changed successfully' }); + return res.status(200).json({ message: `Password for user '${user.username}' changed successfully` }); } catch (error) { handleError(res, error, 'changing password'); } diff --git a/backend/src/routes/meeting.routes.ts b/backend/src/routes/meeting.routes.ts index dc71b75..95f65e6 100644 --- a/backend/src/routes/meeting.routes.ts +++ b/backend/src/routes/meeting.routes.ts @@ -27,7 +27,7 @@ internalMeetingRouter.delete( withAuth(participantTokenValidator), withValidRoomId, withModeratorPermissions, - participantCtrl.deleteParticipant + participantCtrl.kickParticipant ); internalMeetingRouter.put( '/:roomId/participants/:participantIdentity/role', diff --git a/backend/src/services/participant.service.ts b/backend/src/services/participant.service.ts index 8a70fea..4554912 100644 --- a/backend/src/services/participant.service.ts +++ b/backend/src/services/participant.service.ts @@ -129,9 +129,8 @@ export class ParticipantService { return this.livekitService.participantExists(roomId, participantNameOrIdentity, participantField); } - async deleteParticipant(roomId: string, participantIdentity: string): Promise { - this.logger.verbose(`Deleting participant '${participantIdentity}' from room '${roomId}'`); - + async kickParticipant(roomId: string, participantIdentity: string): Promise { + this.logger.verbose(`Kicking participant '${participantIdentity}' from room '${roomId}'`); return this.livekitService.deleteParticipant(roomId, participantIdentity); }