diff --git a/with-chat-server/index.html b/with-chat-server/index.html index 56928b8..014515d 100644 --- a/with-chat-server/index.html +++ b/with-chat-server/index.html @@ -30,7 +30,6 @@ } ); socket.on( 'test', ( data ) => { - console.log( data ) } ); } ); diff --git a/with-chat-server/src/apis/channel-history/channel-history.controller.ts b/with-chat-server/src/apis/channel-history/channel-history.controller.ts index ae0a6a6..5f20b56 100644 --- a/with-chat-server/src/apis/channel-history/channel-history.controller.ts +++ b/with-chat-server/src/apis/channel-history/channel-history.controller.ts @@ -78,7 +78,6 @@ export class ChannelHistoryController { @Query('channelId') channelId: string, @CurrentUser() currentUser, ) { - console.log(lastIdx, channelId); return this.channelHistoryService .getChannelHistory(lastIdx, channelId) .then((result) => { diff --git a/with-chat-server/src/apis/channel-history/channel-history.service.ts b/with-chat-server/src/apis/channel-history/channel-history.service.ts index 9474383..ca5cfba 100644 --- a/with-chat-server/src/apis/channel-history/channel-history.service.ts +++ b/with-chat-server/src/apis/channel-history/channel-history.service.ts @@ -71,8 +71,6 @@ export class ChannelHistoryService { .limit(20) .getMany(); - console.log(result); - if (!result) return []; return result.map((el) => { @@ -100,8 +98,6 @@ export class ChannelHistoryService { .andWhere('channelHistory.idx = :idx', { idx: currIdx }) .getMany(); - console.log(result); - return result.map((el) => { const { password, year, month, day, certified, deletedAt, ...writer } = el.writer; diff --git a/with-chat-server/src/apis/chatting-channel/chatting-channel.controller.ts b/with-chat-server/src/apis/chatting-channel/chatting-channel.controller.ts index 695a340..0bcbb68 100644 --- a/with-chat-server/src/apis/chatting-channel/chatting-channel.controller.ts +++ b/with-chat-server/src/apis/chatting-channel/chatting-channel.controller.ts @@ -60,7 +60,6 @@ export class ChattingChannelController { return await this.chattingChannelService .createChattingChannel(createChattingChannelDto, currentUser) .then((channel) => { - console.log(channel); return res .status(HttpStatus.OK) .json({ success: true, chattingChannel: channel }); diff --git a/with-chat-server/src/apis/chatting-server-invite/chatting-server-invite.service.ts b/with-chat-server/src/apis/chatting-server-invite/chatting-server-invite.service.ts index 5178aaa..57bc00a 100644 --- a/with-chat-server/src/apis/chatting-server-invite/chatting-server-invite.service.ts +++ b/with-chat-server/src/apis/chatting-server-invite/chatting-server-invite.service.ts @@ -31,7 +31,6 @@ export class ChattingRoomInviteService { }); if (isSent) throw new ConflictException('이미 요청된 데이터가 존재합니다.'); - console.log(chattingServerId, targetId); return await this.chattingRoomInviteRepository.save({ chattingServer: { id: chattingServerId }, user: { id: targetId }, @@ -67,7 +66,6 @@ export class ChattingRoomInviteService { }) .then((invite) => invite.chattingServer.id); - console.log(chattingRoomId, 'chattingRoomId'); const result = await queryRunner.manager.save(ChattingServerUserDetail, { master: { id: chattingRoomId }, user: { id: currentUser.id }, diff --git a/with-chat-server/src/apis/chatting-server/chatting-server.service.ts b/with-chat-server/src/apis/chatting-server/chatting-server.service.ts index 690eef4..e530671 100644 --- a/with-chat-server/src/apis/chatting-server/chatting-server.service.ts +++ b/with-chat-server/src/apis/chatting-server/chatting-server.service.ts @@ -67,7 +67,6 @@ export class ChattingServerService { }) .getMany(); - console.log(result); return result; } @@ -146,7 +145,6 @@ export class ChattingServerService { users: users, channels: result.channels, }; - console.log(returnVal); return returnVal; } diff --git a/with-chat-server/src/apis/file/file.service.ts b/with-chat-server/src/apis/file/file.service.ts index 5f3f7dd..082adc4 100644 --- a/with-chat-server/src/apis/file/file.service.ts +++ b/with-chat-server/src/apis/file/file.service.ts @@ -20,14 +20,12 @@ export class FileService { const blobStream = blob.createWriteStream(); blobStream.on('error', (err) => { - console.log(err); res.status(HttpStatus.BAD_REQUEST).json({ success: false, url: `파일 업로드 실패`, }); }); blobStream.on('finish', () => { - console.log('isDone'); res.status(HttpStatus.CREATED).json({ success: true, url: `https://storage.googleapis.com/wthchat/${blob.name}`, diff --git a/with-chat-server/src/apis/friend-request/friend-request.service.ts b/with-chat-server/src/apis/friend-request/friend-request.service.ts index fefde4d..21f9722 100644 --- a/with-chat-server/src/apis/friend-request/friend-request.service.ts +++ b/with-chat-server/src/apis/friend-request/friend-request.service.ts @@ -39,8 +39,6 @@ export class FriendRequestService { const queryRunner = this.connection.createQueryRunner(); await queryRunner.connect(); await queryRunner.startTransaction('SERIALIZABLE'); - console.log(currentUser.id); - console.log(requestId); try { const request = await queryRunner.manager.findOne(FriendRequest, { where: { id: requestId, isAccepted: false }, diff --git a/with-chat-server/src/apis/friend/friend.service.ts b/with-chat-server/src/apis/friend/friend.service.ts index d3af1c1..d729bbc 100644 --- a/with-chat-server/src/apis/friend/friend.service.ts +++ b/with-chat-server/src/apis/friend/friend.service.ts @@ -35,7 +35,6 @@ export class FriendService { }) .getMany(); - console.log(friendList); return friendList; } } diff --git a/with-chat-server/src/apis/users/users.service.ts b/with-chat-server/src/apis/users/users.service.ts index 9009c81..359f01c 100644 --- a/with-chat-server/src/apis/users/users.service.ts +++ b/with-chat-server/src/apis/users/users.service.ts @@ -53,7 +53,6 @@ export class UsersService { try { // const result = this.userRepository.save({ ...createUserDto }); const salt = await bcrypt.genSalt(); - console.log(salt); const user = new User(); user.email = createUserDto.email; @@ -181,7 +180,6 @@ export class UsersService { inviteList, serverList, ]).then((values) => { - console.log(values[3], '==================='); return { user: values[0], friendList: values[1], @@ -215,7 +213,6 @@ export class UsersService { const user = await this.userRepository.findOne({ where: { email: email }, }); - console.log(user); return user !== null; }; @@ -303,8 +300,6 @@ export class UsersService { { ...updateUserDto }, ); - console.log(updateUserDto); - console.log(result, 'result'); if (result.affected < 0) throw new ConflictException('회원정보 수정 실패'); return this.userRepository.findOne({ where: { id: currentUser.id } }); @@ -347,7 +342,6 @@ export class UsersService { }; }); }); - console.log(result); return result; } } diff --git a/with-chat-server/src/chat/chat.gateway.ts b/with-chat-server/src/chat/chat.gateway.ts index 37d5063..a243107 100644 --- a/with-chat-server/src/chat/chat.gateway.ts +++ b/with-chat-server/src/chat/chat.gateway.ts @@ -19,7 +19,6 @@ export class ChatGateway { @SubscribeMessage('join') connectSomeone(@MessageBody() data) { const [user, channelId] = data; - console.log(`${user}님이 코드: ${channelId}방에 접속했습니다.`); const comeOn = `${user}님이 입장했습니다.`; this.server.emit('comeOn' + channelId, comeOn); } @@ -28,12 +27,14 @@ export class ChatGateway { return client; } + @SubscribeMessage('message') + sendMessage2(@MessageBody() data: string, @ConnectedSocket() client: Socket) { + console.log(data); + } + @SubscribeMessage('send') sendMessage(@MessageBody() data: string, @ConnectedSocket() client: Socket) { - console.log(data); const [user, channelId, contents] = data; - console.log(`${client.id} : ${data}`); - console.log('broadcast.emit'); client.broadcast.emit('message' + channelId, [user, contents]); } } diff --git a/with-chat-server/src/main.ts b/with-chat-server/src/main.ts index 7fcb3c9..ca897fc 100644 --- a/with-chat-server/src/main.ts +++ b/with-chat-server/src/main.ts @@ -12,6 +12,6 @@ async function bootstrap() { }); setupSwagger(app); app.useWebSocketAdapter(new SocketIoAdapter(app)); - await app.listen(4000); + await app.listen(3000); } bootstrap();