Skip to content

Conversation

@IISweetHeartII
Copy link
Contributor

Summary

포트폴리오 단건 조회 API를 추가해 포트폴리오 상세 정보를 조회할 수 있도록 구현했습니다.

Changes

  • GET /portfolios/:id 엔드포인트 추가
  • 포트폴리오 상세 응답 DTO 정의 및 변환 로직 추가
  • PortfolioService 신규 도입 및 모듈 의존성 등록
  • Repository 단건 조회 메서드 추가

Type of Change

해당하는 항목에 체크해주세요:

  • Bug fix (기존 기능을 수정하는 변경)
  • New feature (새로운 기능 추가)
  • Breaking change (기존 기능에 영향을 주는 변경)
  • Refactoring (기능 변경 없이 코드 개선)
  • Documentation (문서 변경)
  • Chore (빌드, 설정 등)

Target Environment

배포 대상 브랜치를 선택해주세요:

  • Dev (dev)
  • Prod (main)

Related Issues

관련 이슈를 연결해주세요:

Testing

테스트 방법을 작성해주세요:

  • Postman/Swagger로 API 호출 확인
  • 단위 테스트 통과
  • E2E 테스트 통과
  • pnpm run lint 통과
  • pnpm run build 통과
  • pnpm exec jest --passWithNoTests 통과

Checklist

PR 생성 전 확인사항:

  • 코드 컨벤션을 준수했습니다 (docs/development/CODE_STYLE.md)
  • Git 컨벤션을 준수했습니다 (docs/development/GIT_CONVENTIONS.md)
  • 네이밍 컨벤션을 준수했습니다 (docs/development/NAMING_CONVENTIONS.md)
  • 로컬에서 빌드가 성공합니다 (pnpm run build)
  • 로컬에서 린트가 통과합니다 (pnpm run lint)
  • (API 변경 시) Swagger 문서가 업데이트되었습니다
  • (필요 시) 테스트 코드를 작성했습니다

Screenshots (Optional)

N/A

Additional Notes

Repository에서는 throw 하지 않고 Service 계층에서 비즈니스 예외를 처리하도록 구현했습니다.

@IISweetHeartII IISweetHeartII self-assigned this Feb 12, 2026
@IISweetHeartII IISweetHeartII added ✨ feature New feature or request 덕환 labels Feb 12, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @IISweetHeartII, 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은 포트폴리오 상세 정보를 조회하는 새로운 API 엔드포인트를 추가하여 사용자가 개별 포트폴리오의 전체 내용을 확인할 수 있도록 합니다. 이를 위해 서비스 계층에 비즈니스 로직을 분리하고, 데이터 접근 계층에 필요한 조회 메서드를 구현했으며, 응답 데이터 구조를 상세 조회에 맞게 확장했습니다. 이 변경으로 포트폴리오 관리 기능이 더욱 강화됩니다.

Highlights

  • 포트폴리오 단건 조회 API 추가: 특정 ID를 가진 포트폴리오의 상세 정보를 조회하는 GET /portfolios/:id 엔드포인트를 구현했습니다.
  • PortfolioService 도입: 포트폴리오 조회 로직을 담당하는 PortfolioService를 신규 도입하고 모듈에 의존성을 등록했습니다.
  • Repository 단건 조회 메서드 추가: Repository 계층에 findByIdAndUserId 메서드를 추가하여 특정 사용자의 포트폴리오를 ID로 조회할 수 있도록 했습니다.
  • 응답 DTO 개선: PortfolioDetailResDTOid, createdAt 필드를 추가하고, hopeJobcontributionRate 필드를 nullable로 변경했으며, 엔티티로부터 DTO를 생성하는 static from 메서드를 구현했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/modules/portfolio/application/dtos/portfolio.dto.ts
    • PortfolioDetailResDTOidcreatedAt 필드를 추가했습니다.
    • hopeJobcontributionRate 필드를 nullable로 변경했습니다.
    • 엔티티로부터 DTO 인스턴스를 생성하는 static from 팩토리 메서드를 추가했습니다.
  • src/modules/portfolio/application/services/portfolio.service.ts
    • PortfolioService를 새로 생성했습니다.
    • ID와 사용자 ID로 포트폴리오를 조회하고, 없을 경우 BusinessException을 발생시키는 findByIdOrThrow 메서드를 추가했습니다.
    • 포트폴리오 상세 정보를 조회하여 PortfolioDetailResDTO로 반환하는 getPortfolio 메서드를 추가했습니다.
  • src/modules/portfolio/infrastructure/repositories/portfolio.repository.ts
    • ID와 사용자 ID를 기준으로 포트폴리오를 조회하는 findByIdAndUserId 메서드를 추가했습니다.
  • src/modules/portfolio/portfolio.module.ts
    • PortfolioServiceproviders 배열에 추가하여 모듈에 등록했습니다.
  • src/modules/portfolio/presentation/portfolio.controller.ts
    • PortfolioService를 주입받도록 생성자를 추가했습니다.
    • GET /portfolios/:portfolioId 엔드포인트의 getPortfolio 메서드를 구현했습니다.
    • 사용자 ID를 가져오기 위해 @User('sub') 데코레이터를 추가하고, portfolioIdParseIntPipe를 적용했습니다.
    • 기존의 NOT_IMPLEMENTED 예외를 portfolioService.getPortfolio 호출로 대체했습니다.
Activity
  • 포트폴리오 단건 조회 API 구현을 위한 초기 작업이 진행되었습니다.
  • 새로운 서비스 계층 로직과 데이터 접근 메서드가 추가되었습니다.
  • 기존 DTO가 새로운 API 요구사항에 맞춰 업데이트되었습니다.
  • 컨트롤러에서 새로운 서비스 로직을 사용하여 API 엔드포인트를 완성했습니다.
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

@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

포트폴리오 단건 조회 API 구현에 대한 리뷰입니다. 전반적으로 프로젝트의 아키텍처와 예외 처리 규칙을 잘 준수하여 구현되었습니다. 다만, 응답 DTO 클래스의 가독성과 불변성, 그리고 Swagger 문서의 정확성을 개선할 수 있는 부분이 있어 관련하여 코멘트를 남깁니다.

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

Labels

✨ feature New feature or request 덕환

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 포트폴리오 개별 조회 API 구현

1 participant