-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor/339 기관 프로필 이미지 업데이트 리팩토링 #348
Conversation
- userId 직렬화 어노테이션 변경 - 테스트및 검증 완료
- 프로필 이미지 url 필드를 변경하는 메서드 구현 - 테스트및 검증 완료
- 프로필 이미지 업데이트 유스케이스및 구현체 구현 - 요청 레코드 생성 - 테스트및 검증 완료
- 프로필 이미지 업데이트 유스케이스및 구현체 구현 - 요청 레코드 생성 - 테스트및 검증 완료
- 프로필 이미지 업데이트 엔드 포인트 구현 - 테스트및 검증 완료
Quality Gate passedIssues Measures |
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.
수고하셨습니다
|
||
String presignedUrl = imageUploadUseCase.getPresignedUrl(requestDto.fileName()); | ||
|
||
String fileUrl = presignedUrl.split("\\?")[0]; |
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.
presignedUrl을 클래스로 만들고, 스플릿 메서드를 메서드로 나타내도 좋을 것 같습니다
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.
고생하셨습니다.
이미지 업로드 로직을 프론트분들에게 말씀드려야 작업하실것 같습니다.
@Secured("ROLE_CENTER") | ||
@Operation(summary = "기관 프로필 이미지 수정", description = "기관의 프로필 이미지를 수정합니다.") | ||
@PutMapping("/profileImgUpdate") | ||
public ApiResponse<String> updateCenterProfile( |
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.
카멜케이스보다 /profile-image
이나 /profile/image
정도로 바꾸는게 좋아보입니다.
@@ -34,9 +34,9 @@ public class PreferItemCommandApiController { | |||
@PostMapping() | |||
public ApiResponse<PreferItemCreateResponseDto> registerPreferItem( | |||
@Valid @RequestBody PreferItemCreateRequestDto requestDto, | |||
@CurrentUser UUID userId) { | |||
@UserId UUID centerId) { | |||
|
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.
@RoleId 이어야할것 같은데 맞나요
public record UpdateProfileImgUrlRequestDto( | ||
UUID userId, | ||
String profileImgUrl | ||
) { |
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.
Schema 추가하면 좋을것 같습니다.
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.
추가했습니당
public record CenterProfileImgUpdateRequestDto( | ||
@Schema(description = "파일 이름", example = "image.png") | ||
String fileName |
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.
.
이 포함되어야하는 검증이 추가돼도 될 것 같습니다
📌 과제 설명
이미지 업로드 방식이 presigned 방식으로 변경됨에 따라
기관 프로필 이미지 업데이트 api를 리팩토링했습니다.
프론트에서의 에러가 우려되어 기존 이용하던 기능은 그대로 두었습니다.
👩💻 요구 사항과 구현 내용
✅ PR 포인트 & 궁금한 점