-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 프로필 사진 변경 API (#355) #356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package com.example.RealMatch.user.presentation.dto.request; | ||
|
|
||
| import jakarta.validation.constraints.Size; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Getter | ||
| @NoArgsConstructor | ||
| public class MyProfileCardUpdateRequestDto { | ||
|
|
||
| @jakarta.validation.constraints.NotBlank | ||
| @Size(max = 255) | ||
| private String profileImageUrl; | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |||||||||
| import com.example.RealMatch.match.domain.entity.enums.CampaignSortType; | ||||||||||
| import com.example.RealMatch.match.presentation.dto.request.MatchRequestDto; | ||||||||||
| import com.example.RealMatch.user.presentation.dto.request.MyEditInfoRequestDto; | ||||||||||
| import com.example.RealMatch.user.presentation.dto.request.MyProfileCardUpdateRequestDto; | ||||||||||
| import com.example.RealMatch.user.presentation.dto.response.FavoriteBrandListResponseDto; | ||||||||||
| import com.example.RealMatch.user.presentation.dto.response.FavoriteCampaignListResponseDto; | ||||||||||
| import com.example.RealMatch.user.presentation.dto.response.MyEditInfoResponseDto; | ||||||||||
|
|
@@ -148,7 +149,7 @@ CustomResponse<NicknameAvailableResponseDto> checkNicknameAvailable( | |||||||||
| @RequestParam String nickname | ||||||||||
| ); | ||||||||||
|
|
||||||||||
| @Operation(summary = "회원 탈퇴", description = "회원 탈퇴(Soft Delete) 처리 후 role을 WITHDRAWN으로 변경합니다.") | ||||||||||
| @Operation(summary = "회원 탈퇴 API By 고경수 ", description = "회원 탈퇴(Soft Delete) 처리 후 role을 WITHDRAWN으로 변경합니다.") | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Swagger API 문서의
Suggested change
|
||||||||||
| CustomResponse<Void> withdraw( | ||||||||||
| @Parameter(hidden = true) @AuthenticationPrincipal CustomUserDetails userDetails | ||||||||||
| ); | ||||||||||
|
|
@@ -207,4 +208,11 @@ CustomResponse<FavoriteCampaignListResponseDto> getMyFavoriteCampaigns( | |||||||||
| @RequestParam(required = false) | ||||||||||
| CampaignSortType sort | ||||||||||
| ); | ||||||||||
|
|
||||||||||
| @Operation(summary = "프로필 이미지 수정 API By 고경수", | ||||||||||
| description = "Attachment API로 업로드된 이미지 URL을 받아 프로필 이미지를 변경합니다") | ||||||||||
|
Comment on lines
+212
to
+213
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Swagger API 문서의
Suggested change
|
||||||||||
| CustomResponse<MyProfileCardResponseDto> updateMyProfileImage( | ||||||||||
| @Parameter(hidden = true) CustomUserDetails userDetails, | ||||||||||
| @RequestBody MyProfileCardUpdateRequestDto request | ||||||||||
| ); | ||||||||||
| } | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
프로필 이미지 URL은 비어있지 않은 값이어야 할 것으로 보입니다.
profileImageUrl필드에@NotBlank어노테이션을 추가하여null이나 공백 문자열이 전달되는 것을 방지하는 것이 좋습니다. 이렇게 하면 API의 유효성 검사가 더 명확해지고, 클라이언트에게 더 빠른 피드백을 줄 수 있습니다.User.updateProfileImage메소드에서null이나 공백을 처리하고 있지만, DTO 레벨에서 검증하는 것이 더 바람직합니다.