Skip to content

Commit

Permalink
Merge pull request #194 from Codiary-UMC-6th/refactor/#173-myPage
Browse files Browse the repository at this point in the history
Feat: νŒ€μ› μΆ”κ°€ μ˜ˆμ™Έμ²˜λ¦¬
  • Loading branch information
yumzen authored Aug 20, 2024
2 parents a613049 + cefa00e commit cece10d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public enum ErrorStatus implements BaseErrorCode {
TEAM_NAME_NOT_EXIST(HttpStatus.BAD_REQUEST, "TEAM_2002", "νŒ€ μ΄λ¦„μž…λ ₯은 ν•„μˆ˜ μž…λ‹ˆλ‹€."),
TEAM_ALREADY_EXISTS(HttpStatus.CONFLICT, "TEAM_2003", "이미 μ‘΄μž¬ν•˜λŠ” νŒ€μž…λ‹ˆλ‹€."),
TEAM_ADMIN_UNAUTHORIZED(HttpStatus.BAD_REQUEST, "TEAM_2004", "κ΄€λ¦¬μž κΆŒν•œμ΄ μ—†μŠ΅λ‹ˆλ‹€."),

TEAM_MEMBER_ALREADY_EXISTS(HttpStatus.CONFLICT, "TEAM_2005", "이미 μ‘΄μž¬ν•˜λŠ” νŒ€μ›μž…λ‹ˆλ‹€."),
// 포슀트 κ΄€λ € μ—λŸ¬ 3000
POST_CREATE_UNAUTHORIZED(HttpStatus.BAD_REQUEST, "POST_3001", "포슀트 생성 κΆŒν•œμ΄ μ—†μŠ΅λ‹ˆλ‹€."),
POST_UPDATE_UNAUTHORIZED(HttpStatus.BAD_REQUEST, "POST_3002", "포슀트 μˆ˜μ • κΆŒν•œμ΄ μ—†μŠ΅λ‹ˆλ‹€."),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public class TeamMemberCommandServiceImpl implements TeamMemberCommandService {
private final TeamMemberRepository teamMemberRepository;

public TeamMember addMemberToTeam(Member member, Team team, MemberRole role) {
if(teamMemberRepository.findByTeamAndMember(team, member).isPresent()) {
throw new GeneralException(ErrorStatus.TEAM_MEMBER_ALREADY_EXISTS);
}
TeamMember teamMember = TeamMember.builder()
.team(team)
.member(member)
Expand Down

0 comments on commit cece10d

Please sign in to comment.