Skip to content

Commit

Permalink
fix: 친구 삭제 fromMemberId token에서 꺼내도록 수정 (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
toychip authored Sep 24, 2024
1 parent ee75998 commit 0c9197f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion _endpoint_test/member.http
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Content-Type: application/json
Authorization: {{authorization}}

{
"fromMemberId": "22ee8f4c-c2db-49c5-ad5d-22db7bb67796",
"toMemberId": "71400a62-b535-48c3-967b-5a25a64137ae"
}

Expand Down
3 changes: 2 additions & 1 deletion api/src/main/kotlin/com/mashup/dojo/MemberController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@ class MemberController(
fun deleteFriend(
@RequestBody request: MemberDeleteFriendRelationRequest,
): DojoApiResponse<Unit> {
val currentMemberId = MemberPrincipalContextHolder.current().id
val command =
MemberUseCase.UpdateFriendCommand(
fromId = request.fromMemberId,
fromId = currentMemberId,
toId = request.toMemberId
)
memberUseCase.deleteFriendRelation(command)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0c9197f

Please sign in to comment.