|
@@ -359,6 +359,13 @@ export class RoomService {
|
|
|
roomId: string,
|
|
|
userId: string,
|
|
|
): Promise<boolean> {
|
|
|
+ const roomUsers = await this.userService.getRoomUsers(roomId);
|
|
|
+ roomUsers.forEach(async (i) => {
|
|
|
+ i.IsAssistant = false;
|
|
|
+ if (i.Role !== 'leader') {
|
|
|
+ await this.userService.updateUsers(i);
|
|
|
+ }
|
|
|
+ });
|
|
|
const assistant = await this.userService.getUsersBy(roomId, userId);
|
|
|
assistant.IsAssistant = !assistant.IsAssistant;
|
|
|
const data = assistant;
|