Skip to content
Merged
Show file tree
Hide file tree
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 @@ -41,7 +41,7 @@ public record ArtistPublicProfileResponse(
) {
public static ArtistPublicProfileResponse from(ArtistProfile artistProfile) {
return new ArtistPublicProfileResponse(
artistProfile.getUser().getId(),
artistProfile.getId(),
artistProfile.getArtistName(),
artistProfile.getProfileImageUrl(),
artistProfile.getDescription(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public ArtistPublicProfileResponse getPublicProfile(Long artistId) {
log.info("작가 공개 프로필 조회 시작 - artistId: {}", artistId);

// 작가 프로필 조회
ArtistProfile artistProfile = artistProfileRepository.findByUserId(artistId)
ArtistProfile artistProfile = artistProfileRepository.findById(artistId)
.orElseThrow(() -> new ServiceException("404", "존재하지 않는 작가입니다."));

log.info("작가 공개 프로필 조회 완료 - artistId: {}, artistName: {}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,15 +584,15 @@ void t18() throws Exception {
artistProfileRepository.save(profile);

// when
ResultActions resultActions = mvc.perform(get("/api/artist/profile/" + user1.getId())
ResultActions resultActions = mvc.perform(get("/api/artist/profile/" + profile.getId())
.contentType(MediaType.APPLICATION_JSON))
.andDo(print());

// then
resultActions.andExpect(status().isOk())
.andExpect(jsonPath("$.resultCode").value("200"))
.andExpect(jsonPath("$.msg").value("작가 프로필 조회 성공"))
.andExpect(jsonPath("$.data.artistId").value(user1.getId()))
.andExpect(jsonPath("$.data.artistId").value(profile.getId()))
.andExpect(jsonPath("$.data.artistName").value("유저1작가"))
.andExpect(jsonPath("$.data.description").value("전통 도자기를 현대적으로 재해석하는 작가입니다."))
.andExpect(jsonPath("$.data.mainProducts").value("도자기, 머그컵"))
Expand Down