diff --git a/_endpoint_test/member.http b/_endpoint_test/member.http index 634285a8..ca571ff8 100644 --- a/_endpoint_test/member.http +++ b/_endpoint_test/member.http @@ -20,3 +20,7 @@ Content-Type: application/json ### 타인 프로필 조회 API GET {{host}}/member/{{memberId}}} + + +### 타인 프로필 조회 Mock API +GET {{host}}/member/mock/{{memberId}}} diff --git a/api/src/main/kotlin/com/mashup/dojo/MemberController.kt b/api/src/main/kotlin/com/mashup/dojo/MemberController.kt index 583d72ab..3fbf3541 100644 --- a/api/src/main/kotlin/com/mashup/dojo/MemberController.kt +++ b/api/src/main/kotlin/com/mashup/dojo/MemberController.kt @@ -99,6 +99,31 @@ class MemberController( ) } + // ToDo 로직 연결 후 추후 제거 + @GetMapping("/member/mock/{memberId}") + @Operation( + summary = "타인 멤버 프로필 조회 API", + description = "멤버의 프로필을 조회하는 API." + ) + fun getProfileMock( + @PathVariable memberId: String, + ): DojoApiResponse { + val profileResponse = memberUseCase.findMemberByIdMock(MemberId(memberId)) + + return DojoApiResponse.success( + MemberProfileResponse( + memberId = profileResponse.memberId.value, + profileImageUrl = profileResponse.profileImageUrl, + memberName = profileResponse.memberName, + platform = profileResponse.platform, + ordinal = profileResponse.ordinal, + isFriend = profileResponse.isFriend, + pickCount = profileResponse.pickCount, + friendCount = profileResponse.friendCount + ) + ) + } + @PatchMapping("/member/{id}") @Operation( summary = "멤버 정보 갱신 API", diff --git a/service/src/main/kotlin/com/mashup/dojo/usecase/MemberUseCase.kt b/service/src/main/kotlin/com/mashup/dojo/usecase/MemberUseCase.kt index c8f12521..0e956321 100644 --- a/service/src/main/kotlin/com/mashup/dojo/usecase/MemberUseCase.kt +++ b/service/src/main/kotlin/com/mashup/dojo/usecase/MemberUseCase.kt @@ -44,6 +44,9 @@ interface MemberUseCase { fun update(command: UpdateCommand): MemberId fun findMemberById(targetMemberId: MemberId): ProfileResponse + + // ToDo 로직 연결 후 추후 제거 + fun findMemberByIdMock(targetMemberId: MemberId): ProfileResponse } @Component @@ -115,4 +118,18 @@ class DefaultMemberUseCase( friendCount = friendCount ) } + + // ToDo 로직 연결 후 추후 제거 + override fun findMemberByIdMock(targetMemberId: MemberId): MemberUseCase.ProfileResponse { + return MemberUseCase.ProfileResponse( + memberId = targetMemberId, + profileImageUrl = "targetMemberProfileImageUrl", + memberName = "김아무개", + platform = MemberPlatform.SPRING.name, + ordinal = 14, + isFriend = false, + pickCount = 0, + friendCount = 0 + ) + } }