Skip to content

[Fix/#605] 과제/댓글 API 버그 수정 및 Swagger 문서 정비 - #606

Merged
JungMINI-developer merged 7 commits into
developfrom
fix/issue-605
Aug 10, 2026
Merged

JungMINI-developer merged 7 commits into
developfrom
fix/issue-605

Conversation

@jeongkyueun

@jeongkyueun jeongkyueun commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

📌 PR 제목 (제목 작성 후 해당 부분은 내용에서 지워주세요!)

[Feat/#이슈 번호] " pr message "
(예시 : [Feat/#1] "로그인 기능 추가")

📌 관련 이슈번호

(Closes 키워드가 있어야 PR이 머지되었을 때 이슈가 자동으로 닫힌다)

📌 PR 유형

어떤 변경 사항이 있나요?

  • 새 기능 추가
  • 버그 수정
  • 리팩토링

📌 PR 요약

해당 PR을 간단하게 요약해 주세요

📌 작업 세부 내용


요약

API 명세서(노션)와 swagger, 실제 코드 동작을 대조 점검하면서 발견한
버그 수정 및 문서 정리입니다.

버그 수정

  • D-Day 계산 오류: 서버 프로세스 타임존에 의존하던 계산 방식을
    UTC+9 명시적 변환으로 수정 (배포 서버가 UTC 타임존이면 KST 자정
    전후로 하루씩 밀리던 문제)
  • 마감일 지난 과제 세부과제 등록/수정 예외처리: 세부과제 일괄
    수정 API에 빠져있던 "부모 과제 마감일 초과 불가" 검증 추가,
    부모 마감일이 이미 지난 경우 TASK_DEADLINE_EXPIRED로 구분 반환
  • 댓글 삭제 403 버그: error.status를 잘못 지정해 실제로는 500이
    나가던 것을 수정 (문서는 403으로 되어있었는데 코드가 안 맞았음)
  • 초대 코드 재사용 시 권한 검증 누락 (보안): 이미 발급된 초대
    코드를 재조회하는 경로에 멤버십 검증이 없어, 과제 멤버가 아니어도
    taskId만 알면 초대 코드를 가져갈 수 있던 문제 수정

문서 정리

  • swagger.yml을 실제 코드 동작 기준으로 재검토 (팀원 조회, 세부과제
    마감일 변경, 댓글 CRUD, 세부과제 상태 변경, 초대 코드 생성,
    개인→팀 과제 전환)
  • 존재하지 않는 응답 케이스 제거, errorCode/메시지 불일치 수정,
    누락된 400 검증 케이스 추가

테스트

  • npx vitest run 전체 통과 (기존부터 실패하던 무관한 테스트 제외,
    회귀 없음을 베이스라인과 비교해 확인)
  • 로컬 서버 기동 및 수동 시나리오 확인

📸 스크린샷 (선택)

🔗 참고 자료

Summary by CodeRabbit

  • 버그 수정

    • 초대 링크 생성 및 조회 시 권한 검사가 강화되었습니다.
    • 초대 링크가 24시간 후 만료되며, 권한 없는 사용자의 접근이 제한됩니다.
    • 부모 과제와 세부 과제의 마감일 검증이 개선되었습니다.
    • 날짜 계산이 한국 시간 기준으로 안정화되었습니다.
    • 댓글 삭제 권한 오류가 일관된 오류 코드로 제공됩니다.
  • 문서화

    • 초대 링크, 세부 과제, 댓글 및 팀원 API의 검증 조건과 오류 응답이 구체화되었습니다.
    • 댓글 작성자 정보는 인증된 사용자 기준으로 처리됩니다.

@jeongkyueun jeongkyueun self-assigned this Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jeongkyueun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Free

Run ID: 6ebdef00-796e-464b-94f8-6f569b53afbe

📥 Commits

Reviewing files that changed from the base of the PR and between 2790e1f and 9ed5040.

📒 Files selected for processing (3)
  • src/controllers/task.controller.js
  • src/services/task.service.js
  • src/swagger/swagger.yml
📝 Walkthrough

Walkthrough

과제 마감일 계산과 세부 과제 검증을 수정했습니다. 초대 링크 권한과 만료 조건을 정비했습니다. 댓글 권한 오류를 구체화했습니다. 관련 OpenAPI 오류 응답과 요청 스키마를 갱신했습니다.

Changes

과제 동작 및 API 계약

Layer / File(s) Summary
마감일 계산 및 세부 과제 검증
src/dtos/task.dto.js, src/services/task.service.js, src/swagger/swagger.yml, tests/unit/subtask-enddate-nullable.test.js
calculateDDay가 KST 기준으로 날짜 차이를 계산합니다. 세부 과제 생성과 수정은 부모 과제 마감일 및 만료 상태를 검증합니다. 관련 오류 응답과 테스트 fixture를 갱신했습니다.
초대 링크 권한 및 재사용
src/controllers/task.controller.js, src/services/task.service.js, src/swagger/swagger.yml
팀 과제 멤버의 초대 링크 관리 권한을 검증합니다. 유효한 코드를 재사용하고 만료 조건을 확인합니다. 성공 메시지와 API 문서를 변경했습니다.
댓글 삭제 오류 및 댓글 API 계약
src/services/comment.service.js, src/swagger/swagger.yml
댓글 작성자가 아닌 사용자의 삭제 요청에 ForbiddenError("FORBIDDEN", ...)를 사용합니다. 댓글 생성 요청에서 user_id를 제거하고 검증 오류 응답을 구체화했습니다.
과제 및 팀원 API 오류 계약
src/swagger/swagger.yml
과제 변환, 세부 과제 상태·조회, 팀원 조회 API의 검증 오류와 권한 오류 예시를 구체화했습니다. profileImage를 nullable로 변경했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

# Conflicts:
#	src/services/task.service.js
#	src/swagger/swagger.yml
#	tests/unit/subtask-enddate-nullable.test.js
@JungMINI-developer
JungMINI-developer merged commit 178e751 into develop Aug 10, 2026
3 checks passed
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.

[Fix/Docs] 과제/댓글 API 버그 수정 및 Swagger 문서 정비

2 participants