Skip to content

Commit

Permalink
fix: 대기방에 나 혼자 있을 때 빈 배열
Browse files Browse the repository at this point in the history
  • Loading branch information
xxeol2 committed Jan 18, 2022
1 parent 59858db commit e6fa896
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions functions/api/routes/room/roomWaitingMemberGET.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ module.exports = async (req, res) => {

// 요청을 보낸 사용자를 제외한 member list
const friendsEntries = await roomDB.getFriendsByIds(client, roomId, userId);
if(!friendsEntries.length) {
res.status(statusCode.OK).send(util.success(statusCode.OK, responseMessage.GET_WAITROOM_DATA_SUCCESS, { members: [] }));
}
const friendsIds = friendsEntries.map((f) => f.userId);
const users = await userDB.getUsersByIds(client, friendsIds);
let members = [];
Expand Down

0 comments on commit e6fa896

Please sign in to comment.