Skip to content

Conversation

@jiminnimij
Copy link
Member

#️⃣ 연관된 이슈

관련된 이슈 번호를 적어주세요. 예: #이슈번호

#️⃣ 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요. (이미지 첨부 가능)

#️⃣ 테스트 결과

코드 변경에 대해 테스트를 수행한 결과를 요약해주세요. 예: 모든 테스트 통과 여부, 새로 작성한 테스트 케이스 등

#️⃣ 변경 사항 체크리스트

  • 코드에 영향이 있는 모든 부분에 대한 테스트를 작성하고 실행했나요?
  • 문서를 작성하거나 수정했나요? (필요한 경우)
  • 코드 컨벤션에 따라 코드를 작성했나요?
  • 본 PR에서 발생할 수 있는 모든 의존성 문제가 해결되었나요?

#️⃣ 스크린샷 (선택)

관련된 스크린샷이 있다면 여기에 첨부해주세요.

#️⃣ 리뷰 요구사항 (선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.
예시: 이 부분의 코드가 잘 작동하는지 테스트해 주실 수 있나요?

📎 참고 자료 (선택)

관련 문서, 스크린샷, 또는 예시 등이 있다면 여기에 첨부해주세요

@jiminnimij jiminnimij merged commit 852d5d9 into main Nov 29, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jiminnimij, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사용자가 자신의 '응원' 및 '질문' 게시물을 조회할 수 있는 기능을 도입합니다. 이 기능은 새로운 데이터 전송 객체(DTO) 추가, 해당 컨트롤러에 새로운 API 엔드포인트 구현, 그리고 이러한 게시물의 검색 및 페이지네이션을 처리하는 서비스 메서드 업데이트를 포함합니다.

Highlights

  • 새로운 DTO 추가: 사용자 게시물 미리보기를 위한 MyPreview와 해당 응답을 위한 MyPreviewGetResponse DTO가 새로 추가되었습니다.
  • 컨트롤러 엔드포인트 확장: CheerControllerQuestionController에 인증된 사용자의 '응원' 및 '질문' 게시물 목록을 페이지네이션하여 조회하는 새로운 GET 엔드포인트가 추가되었습니다.
  • 서비스 로직 추가: PreviewService에 회원 ID와 게시물 유형을 기반으로 페이지네이션된 게시물 목록을 가져오는 getMyPreviews 메서드가 구현되었습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 사용자가 작성한 '응원'과 '질문' 목록을 조회하는 API를 추가하는 변경 사항을 담고 있습니다. 전반적으로 기능 추가는 잘 이루어졌지만, 몇 가지 개선점을 발견했습니다. 컨트롤러에서 일관성 없는 메소드 이름, 불필요한 import 구문, 그리고 서비스 레이어의 변수명 오타 등이 있습니다. 아래 리뷰 댓글에서 자세한 내용과 수정 제안을 확인해주세요.

@@ -1,14 +1,19 @@
package com.example.tikitaka.domain.post.controller;

import com.example.tikitaka.domain.post.dto.ExhibitionPreview;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

사용되지 않는 ExhibitionPreview import 구문이 있습니다. 불필요한 import는 코드를 정리하고 혼란을 줄이기 위해 제거하는 것이 좋습니다.

@@ -1,14 +1,19 @@
package com.example.tikitaka.domain.post.controller;

import com.example.tikitaka.domain.post.dto.ExhibitionPreview;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

사용되지 않는 ExhibitionPreview import 구문이 있습니다. 불필요한 import는 코드를 정리하고 혼란을 줄이기 위해 제거하는 것이 좋습니다.

Comment on lines +36 to +42
public MyPreviewGetResponse myCheerList(
@AuthenticationPrincipal Long memberId,
@RequestParam(required = true) int pageNum,
@RequestParam(required = true) int limit
) {
return previewService.getMyPreviews(memberId, PostType.QUESTION, pageNum, limit);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

메소드 이름이 myCheerList로 되어 있어 QuestionController의 맥락과 맞지 않습니다. 이 컨트롤러는 질문(Question)에 관련된 기능을 다루므로, 메소드 이름을 myQuestionList로 변경하여 코드의 가독성과 명확성을 높이는 것이 좋겠습니다.

Suggested change
public MyPreviewGetResponse myCheerList(
@AuthenticationPrincipal Long memberId,
@RequestParam(required = true) int pageNum,
@RequestParam(required = true) int limit
) {
return previewService.getMyPreviews(memberId, PostType.QUESTION, pageNum, limit);
}
public MyPreviewGetResponse myQuestionList(
@AuthenticationPrincipal Long memberId,
@RequestParam(required = true) int pageNum,
@RequestParam(required = true) int limit
) {
return previewService.getMyPreviews(memberId, PostType.QUESTION, pageNum, limit);
}

import java.util.List;
import java.util.Objects;

import static java.util.stream.Collectors.toList;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

코드에서 Stream.toList() (Java 16+ 기능)를 사용하고 있으므로, java.util.stream.Collectors.toList의 static import는 필요하지 않습니다. 불필요한 import를 제거하여 코드를 더 깔끔하게 유지하는 것이 좋습니다.

Comment on lines +83 to +87
List<MyPreview> previesDto = previews.getContent().stream().map(
MyPreview::of
).toList();

return MyPreviewGetResponse.of(previesDto, pageInfo);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

변수명에 오타가 있습니다. previesDtopreviewsDto로 수정하여 다른 변수명과 일관성을 맞추고 코드의 가독성을 높이는 것을 권장합니다.

Suggested change
List<MyPreview> previesDto = previews.getContent().stream().map(
MyPreview::of
).toList();
return MyPreviewGetResponse.of(previesDto, pageInfo);
List<MyPreview> previewsDto = previews.getContent().stream().map(
MyPreview::of
).toList();
return MyPreviewGetResponse.of(previewsDto, pageInfo);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants