Skip to content

Commit

Permalink
Merge pull request #50 from gutanbug/dev
Browse files Browse the repository at this point in the history
fix #14 : 팀 상세 조회 일부 수정
  • Loading branch information
gutanbug authored Mar 11, 2024
2 parents e17c6bc + 638c852 commit 94dcd4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public ResponseTeamInfoDto getMyTeamInfo(Long userId) {

String mentor = userRepository.findMentorByTeamId(team.getId()).orElseThrow(TeamNotFoundException::new).getName();

List<User> userList = userRepository.findTeamMemberByTeamId(team.getId());
List<User> userList = userRepository.findTeamMenteeByTeamId(team.getId());

List<String> members = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public interface UserRepository extends JpaRepository<User, Long> {
@Query("select u from User u where u.team.id = :teamId and u.userRole = 'MENTOR'")
Optional<User> findMentorByTeamId(@Param("teamId") Long teamId);

@Query("select u from User u where u.team.id = :teamId")
List<User> findTeamMemberByTeamId(@Param("teamId") Long teamId);
@Query("select u from User u where u.team.id = :teamId and u.userRole = 'MENTEE'")
List<User> findTeamMenteeByTeamId(@Param("teamId") Long teamId);
}

0 comments on commit 94dcd4e

Please sign in to comment.