Skip to content

Feat: 첨삭 상태 및 개별 조회 API 구현 (#41)#79

Merged
IISweetHeartII merged 2 commits intodevfrom
feat/correction-status-detail-#41
Feb 12, 2026
Merged

Feat: 첨삭 상태 및 개별 조회 API 구현 (#41)#79
IISweetHeartII merged 2 commits intodevfrom
feat/correction-status-detail-#41

Conversation

@IISweetHeartII
Copy link
Contributor

@IISweetHeartII IISweetHeartII commented Feb 12, 2026

Summary

포트폴리오 첨삭 도메인의 상태 조회 및 개별 첨삭 조회 API를 구현했습니다. 조회 시 사용자 소유권 검증을 추가해 userId 범위의 읽기 권한을 적용했습니다.

Changes

  • GET /portfolio-corrections/:correctionId/status 구현
  • GET /portfolio-corrections/:correctionId 구현
  • PortfolioCorrectionRepository에 findByIdAndUserId 추가
  • PortfolioCorrectionService에 findByIdAndUserIdOrThrow/getStatus/getCorrectionDetail 추가
  • Controller 조회 API에 @user('sub') userId 주입 및 서비스 호출 시 전달
  • CorrectionItemRepository/Service에 correctionId 기준 조회 메서드 추가
  • CorrectionStatusResDTO/CorrectionResultResDTO/CorrectionItemResDTO from 매핑 로직 추가

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: 통과 (TSC 0 issues)
  • pnpm exec jest --passWithNoTests: No tests found, code 0

Checklist

  • 코드 컨벤션을 준수했습니다 (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

@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를 구현합니다. 주요 목적은 사용자가 자신의 포트폴리오 첨삭 진행 상황을 확인하고, 특정 첨삭의 상세 내용을 조회할 수 있도록 하는 것입니다. 특히, 모든 조회 API에 userId 기반의 소유권 검증 로직을 적용하여 보안을 강화하고, 사용자가 본인 소유의 첨삭 정보만 접근할 수 있도록 제한합니다. 이를 통해 데이터 무결성과 사용자 프라이버시를 보장합니다.

Highlights

  • 새로운 API 엔드포인트 추가: 첨삭 상태 조회 API (GET /portfolio-corrections/:id/status)와 개별 첨삭 조회 API (GET /portfolio-corrections/:id)가 추가되었습니다.
  • DTO 확장 및 개선: CorrectionResultResDTO 및 CorrectionItemResDTO에 엔티티로부터 DTO를 생성하는 정적 팩토리 메서드가 추가되었고, CorrectionItemResDTO의 일부 필드 타입이 Record<string, unknown>으로 변경되었습니다. CorrectionStatusResDTO에도 정적 팩토리 메서드가 추가되었습니다.
  • 서비스 계층 로직 구현: CorrectionItemService에 findByCorrectionId 메서드가, PortfolioCorrectionService에 개별 첨삭 조회 및 상태 조회 로직(getStatus, getCorrectionDetail)이 구현되었습니다.
  • Repository 계층 쿼리 추가: CorrectionItemRepository에 findByCorrectionId 쿼리 메서드가, PortfolioCorrectionRepository에 findByIdAndUserId 쿼리 메서드가 추가되었습니다.
  • 사용자 소유권 검증 강화: 모든 조회 API에 userId 기반의 소유권 검증 로직이 적용되어, 사용자가 본인 소유의 첨삭 정보만 접근할 수 있도록 제한되었습니다.

🧠 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-correction/application/dtos/correction-result.dto.ts
    • CorrectionResultResDTO 및 CorrectionItemResDTO에 엔티티로부터 DTO를 생성하는 static from 팩토리 메서드가 추가되었습니다.
    • CorrectionItemResDTO의 overallReview, description, responsibilities, problemSolving, learnings 필드 타입이 string에서 Record<string, unknown>으로 변경되었습니다.
  • src/modules/portfolio-correction/application/dtos/portfolio-correction.dto.ts
    • CorrectionStatusResDTO에 PortfolioCorrection 엔티티로부터 DTO를 생성하는 static from 팩토리 메서드가 추가되었습니다.
  • src/modules/portfolio-correction/application/services/correction-item.service.ts
    • 특정 첨삭 ID에 해당하는 모든 첨삭 항목을 조회하는 findByCorrectionId 메서드가 추가되었습니다.
  • src/modules/portfolio-correction/application/services/portfolio-correction.service.ts
    • CorrectionItemService가 주입되었습니다.
    • correctionId와 userId를 기반으로 첨삭을 찾아 반환하거나 예외를 발생시키는 findByIdAndUserIdOrThrow 메서드가 추가되었습니다.
    • 특정 첨삭의 상태를 조회하는 getStatus 메서드가 추가되었습니다.
    • 특정 첨삭의 상세 내용을 조회하는 getCorrectionDetail 메서드가 추가되었습니다.
  • src/modules/portfolio-correction/infrastructure/repositories/correction-item.repository.ts
    • correctionId를 기준으로 첨삭 항목을 조회하는 findByCorrectionId 쿼리 메서드가 추가되었습니다.
  • src/modules/portfolio-correction/infrastructure/repositories/portfolio-correction.repository.ts
    • id와 userId를 기준으로 단일 첨삭을 조회하는 findByIdAndUserId 쿼리 메서드가 추가되었습니다.
  • src/modules/portfolio-correction/presentation/portfolio-correction.controller.ts
    • GET /portfolio-corrections/:correctionId/status 엔드포인트가 구현되어 PortfolioCorrectionService.getStatus를 호출하도록 변경되었습니다.
    • GET /portfolio-corrections/:correctionId 엔드포인트가 구현되어 PortfolioCorrectionService.getCorrectionDetail을 호출하도록 변경되었습니다.
    • 두 엔드포인트 모두 @user('sub') userId를 통해 사용자 ID를 받아 소유권 검증에 활용하도록 수정되었습니다.
Activity
  • 이 PR에는 현재까지 어떠한 인간 활동(댓글, 리뷰 등)도 기록되지 않았습니다.
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 구현이 포함된 PR입니다. 서비스, 레포지토리, 컨트롤러 계층에 걸쳐 변경 사항이 있으며, 서비스 계층에서 소유권 검증 로직이 추가되었습니다. DTO의 타입 안정성 개선과 관련된 리뷰 의견 1건을 추가했습니다.

@IISweetHeartII IISweetHeartII self-assigned this Feb 12, 2026
@IISweetHeartII IISweetHeartII added ✨ feature New feature or request 덕환 labels Feb 12, 2026
@IISweetHeartII IISweetHeartII merged commit 563b499 into dev Feb 12, 2026
2 checks passed
@IISweetHeartII IISweetHeartII deleted the feat/correction-status-detail-#41 branch February 12, 2026 05:05
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