forked from kakao-tech-campus-2nd-step3/Team29_BE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: 멤버가 영속성 컨텍스트에 존재하지 않은 상태로 조회되어 생기는 오류 해결
- Loading branch information
1 parent
5be216f
commit b10bc40
Showing
3 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/main/java/notai/member/presentation/response/MemberFindResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package notai.member.presentation.response; | ||
|
||
import notai.member.application.result.MemberFindResult; | ||
import notai.member.domain.Member; | ||
|
||
public record MemberFindResponse( | ||
Long id, | ||
String nickname | ||
) { | ||
public static MemberFindResponse from(MemberFindResult result) { | ||
return new MemberFindResponse(result.id(), result.nickname()); | ||
public static MemberFindResponse from(Member member) { | ||
return new MemberFindResponse(member.getId(), member.getNickname()); | ||
} | ||
} |