[REFACTOR] 홈 화면 로직 변경#239
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
||
| @Lob | ||
| @Column(name = "content", nullable = false) | ||
| @Column(name = "content", columnDefinition = "MEDIUMTEXT", nullable = false, length = 16777215) |
There was a problem hiding this comment.
저는 암 생각 없이 LONGTEXT로 변경했는데 MEDIUMTEXT로 설정한 이유가 있으신지 궁금합니다!
There was a problem hiding this comment.
앗 이부분은 저도 그냥 오류떠서 ai로 해결한거여서 별 이유없습니다 ㅎㅎ..
There was a problem hiding this comment.
그럼 해당 부분 충돌난 것 같으니 제가 올린 LONGTEXT로 통일해도 괜찮을까요?
| .map(dto -> { | ||
| Image image = imageRepository.findById(dto.getImageId()) | ||
| .orElseThrow(() -> new GeneralException(ImageErrorCode.IMAGE_40001)); |
There was a problem hiding this comment.
스티커마다 imageRepository.findById()를 실행하는데, 이게 스티커 개수만큼 조회를 하게 되는 거라! 이미지 ID를 모아서 findAllById 등으로 미리 리스트를 받는 건 어떨지....
그리고 이미지 조회 중 하나라도 실패하면 예외가 발생하게 되는데 이것도 의도하신 건지 여쭙습니다!
There was a problem hiding this comment.
imageId를 모아서 findAllById()로 한 번에 조회하도록 수정했습니다. 그리고 이미지 조회 실패부분은 우선은 하나라도 실패하면은 전체 예외 발생하는것으로 의도했는데 이미지 하나마다 검사하여서 해당 이미지만 오류나게 하는게 더 좋을까요..?
There was a problem hiding this comment.
음... UX를 고려하면 오류가 발생한 이미지만 제외하고 다시 그리는 게 좋긴 한데 전체 예외 발생도 로직상 문제는 없을 것 같아요! 2차 QA 후 관련 이야기 들어오면 수정하는 걸로 할까요?! 백엔드끼리 논의해도 좋을 것 같습니다!
ownue
left a comment
There was a problem hiding this comment.
수고하셨습니다! Term 엔티티 충돌 해결하고 머지 부탁드립니다~!
📌 PR 개요
PUT /home/edit) 하나로 통합하고, 더 이상 쓰이지 않는 기존 코드 정리🛠 변경 사항
PUT /home/edit에서 배경색 변경 + 스티커 배치를 한 번에 저장하도록 통합 (HomeController,HomeService.editHome,HomeEditRequest)StickerController/StickerService/StickerServiceImpl및 관련 요청·응답 DTOSettingController의PATCH /users/me/homecolor,SettingService.updateHomeColor()및 관련 DTOStickerErrorCode,HomeColorErrorCode,UserStickerImageQueryRepository테스트
HomeControllerTest추가: 배경색+스티커 동시 저장, 신규 유저 설정 자동 생성, 재저장 시 기존 스티커 완전 교체, 잘못된 색상 포맷 400, 존재하지 않는 이미지 참조 에러, 미인증 401deleteAllByUserId후 재생성)로 바뀌었는데, 프론트에서 매번 스티커 전체 목록을 보내는 흐름으로 맞춰졌는지 확인 필요✅ 체크리스트