refactor: id를 postId로 통일 및 이미지 조회 로직 수정#147
Conversation
- 기존 PR에서 이미지 조회로직이 createImageGetUrl을 사용하도록 변경됨 - 기존 PR에서 변경된 사항이 반영되지 않아 수정
- 프론트에서 id를 postId 등으로 형식통일해달라고 요청하여 수정
|
Caution Review failedThe pull request is closed. Walkthrough게시글 단건/목록 응답에서 식별자 필드명을 id→postId로 변경했고, 공개용 조회 서비스에서 이미지 목록을 엔티티 대신 ImageDto로 매핑하도록 수정했습니다. 관련 테스트는 필드명 변경과 이미지 URL 생성 로직(imageUtil 기반)에 맞춰 단정문을 갱신했습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as PostController
participant S as PostService
participant R as PostRepository
participant IR as ImageRepository
participant U as ImageUtil
C->>S: getPostForPublic(postId, currentUser)
S->>R: findPostWithRelations(postId)
R-->>S: PostEntity(+ PostImageEntity list)
loop map images
S->>U: createImageGetUrl(imagePath)
U-->>S: publicImageUrl
S->>S: new ImageDto(publicImageUrl, imageId)
end
S-->>C: GetPostResponse(postId, ..., images: List<ImageDto>, likeCount, isLiked)
C-->>Caller: 200 OK + body
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (6)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
개요
프론트엔드 요청에 따라 응답 DTO의
id필드를postId로 통일하고, 이미지 조회 로직을 개선했습니다.작업사항
Post 응답 DTO 필드 통일:
GetPostResponse와GetPostsResponse의id→postId로 변경이미지 조회 로직 개선:
createImageGetUrl사용 로직 반영테스트 코드 업데이트:
PostServiceTest,PostControllerTest,PublicPostControllerTest업데이트🤖 Generated with Claude Code
Summary by CodeRabbit