Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ› bugfix: ์ดˆ๋Œ€์ฝ”๋“œ ์˜ˆ์™ธ์ฒ˜๋ฆฌ ์ถ”๊ฐ€ #164

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public InviteReceiveResult matchRelation(Long userId, InviteCommand request){
Parentchild parentchild = parentchildRetriever.getByInviteCode(request.inviteCode());
int count = userRetriever.getParentchildUserCnt(parentchild);
if (count == 1) {
// validateInviteRequest(user, parentchild);
validateInviteRequest(user, parentchild);
completeMatching(user, parentchild);
}
Long opponentUserId = userRetriever.getOpponentUserId(userId);
Expand All @@ -99,14 +99,14 @@ public InviteReceiveResult matchRelation(Long userId, InviteCommand request){
}

private void validateInviteRequest(User user, Parentchild parentchild) {
if (user.getParentchild().equals(parentchild)) {
if (user.getParentchild() != null && user.getParentchild().equals(parentchild)) {
throw new ParentchildException(MY_PARENTCHILD_INVITE);
}

int cntWithUser = userRetriever.getParentchildUserCnt(user.getParentchild());
parentchildManager.validateUserRelation(user, cntWithUser);
int cntWithInviteCode = userRetriever.getParentchildUserCnt(parentchild);
parentchildManager.validateInviteCode(parentchild, cntWithInviteCode);
// int cntWithUser = userRetriever.getParentchildUserCnt(user.getParentchild());
// parentchildManager.validateUserRelation(user, cntWithUser);
// int cntWithInviteCode = userRetriever.getParentchildUserCnt(parentchild);
// parentchildManager.validateInviteCode(parentchild, cntWithInviteCode);
}

// ์ดˆ๋Œ€์ฝ”๋“œ ๋ฐœ๊ธ‰ ๋ฐ ์ „์†กํ•˜๊ธฐ (Parentchild ์ƒ์„ฑ)
Expand Down
Loading