From 0c9197fd4ee1963998cacd93190df357738844f6 Mon Sep 17 00:00:00 2001 From: Junhyoung Lim <109949924+toychip@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:29:06 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=B9=9C=EA=B5=AC=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=20fromMemberId=20token=EC=97=90=EC=84=9C=20=EA=BA=BC=EB=82=B4?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20(#139)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _endpoint_test/member.http | 1 - api/src/main/kotlin/com/mashup/dojo/MemberController.kt | 3 ++- api/src/main/kotlin/com/mashup/dojo/dto/MemberCreateRequest.kt | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/_endpoint_test/member.http b/_endpoint_test/member.http index 81d9b93..c005d19 100644 --- a/_endpoint_test/member.http +++ b/_endpoint_test/member.http @@ -45,7 +45,6 @@ Content-Type: application/json Authorization: {{authorization}} { - "fromMemberId": "22ee8f4c-c2db-49c5-ad5d-22db7bb67796", "toMemberId": "71400a62-b535-48c3-967b-5a25a64137ae" } diff --git a/api/src/main/kotlin/com/mashup/dojo/MemberController.kt b/api/src/main/kotlin/com/mashup/dojo/MemberController.kt index 54cc76d..45b755d 100644 --- a/api/src/main/kotlin/com/mashup/dojo/MemberController.kt +++ b/api/src/main/kotlin/com/mashup/dojo/MemberController.kt @@ -216,9 +216,10 @@ class MemberController( fun deleteFriend( @RequestBody request: MemberDeleteFriendRelationRequest, ): DojoApiResponse { + val currentMemberId = MemberPrincipalContextHolder.current().id val command = MemberUseCase.UpdateFriendCommand( - fromId = request.fromMemberId, + fromId = currentMemberId, toId = request.toMemberId ) memberUseCase.deleteFriendRelation(command) diff --git a/api/src/main/kotlin/com/mashup/dojo/dto/MemberCreateRequest.kt b/api/src/main/kotlin/com/mashup/dojo/dto/MemberCreateRequest.kt index e5af701..df3be48 100644 --- a/api/src/main/kotlin/com/mashup/dojo/dto/MemberCreateRequest.kt +++ b/api/src/main/kotlin/com/mashup/dojo/dto/MemberCreateRequest.kt @@ -38,9 +38,6 @@ data class MemberCreateFriendRelationRequest( @Schema(description = "팔로우 해제 요청") data class MemberDeleteFriendRelationRequest( - @field:NotBlank - @Schema(description = "팔로우 해제 요청한 유저 id") - val fromMemberId: MemberId, @field:NotBlank @Schema(description = "팔로우 해제 대상 유저 id") val toMemberId: MemberId,