Skip to content

Commit 9a4c6b3

Browse files
committed
fix: 태그 Repository 조회 불가 오류 수정
1 parent b2e7bd0 commit 9a4c6b3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/main/java/gg/agit/konect/domain/club/repository/ClubTagMapRepository.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ public interface ClubTagMapRepository extends Repository<ClubTagMap, ClubTagMapI
1717
void deleteByClubId(Integer clubId);
1818

1919
ClubTagMap save(ClubTagMap clubTagMap);
20-
21-
void saveAll(List<ClubTagMap> clubTagMaps);
2220
}

src/main/java/gg/agit/konect/domain/club/service/ClubService.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,13 @@ public void updateProfile(Integer clubId, Integer userId, ClubProfileUpdateReque
167167
throw CustomException.of(NOT_FOUND_CLUB);
168168
}
169169

170-
List<ClubTagMap> tagMaps = tags.stream()
171-
.map(tag -> ClubTagMap.builder()
170+
tags.forEach(tag -> {
171+
ClubTagMap tagMap = ClubTagMap.builder()
172172
.club(club)
173173
.tag(tag)
174-
.build())
175-
.toList();
176-
177-
clubTagMapRepository.saveAll(tagMaps);
174+
.build();
175+
clubTagMapRepository.save(tagMap);
176+
});
178177
}
179178

180179
@Transactional

0 commit comments

Comments
 (0)