Skip to content

refactor(api): 중복 users/me API 라우트 제거 - #89

Merged
evenif99 merged 1 commit into
devfrom
refactor/remove-duplicate-users-api
Jun 20, 2026
Merged

refactor(api): 중복 users/me API 라우트 제거#89
evenif99 merged 1 commit into
devfrom
refactor/remove-duplicate-users-api

Conversation

@evenif99

@evenif99 evenif99 commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • /api/users/me(복수)와 /api/user/me(단수)가 동일한 역할로 중복 존재하던 문제 제거
  • 기능이 완성된 /api/user/me(단수) 유지, 최소 구현(GET, 3개 필드)만 남아있던 /api/users/me(복수) 삭제
  • 삭제 대상: src/app/api/users/me/route.ts, src/app/api/users/.gitkeep

배경

두 라우트의 역할 비교:

경로 GET 반환 필드 PATCH 유지 여부
/api/user/me (단수) id, name, email, nickname, profileImageUrl, mbti ✅ (이미지 업로드 포함) ✅ 유지
/api/users/me (복수) id, nickname, mbti ❌ 삭제

도메인 클라이언트(src/domains/user/api.ts)도 단수 경로(/api/user/me)를 사용 중이므로 변경 영향 없음.

Test plan

  • 마이페이지 내 정보 조회 정상 동작 확인
  • 프로필 수정(닉네임, MBTI, 이미지) 정상 동작 확인
  • /api/users/me 경로 접근 시 404 반환 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

릴리스 노트

  • Revert
    • 사용자 정보 조회 API 엔드포인트가 제거되었습니다.

/api/users/me(복수)와 /api/user/me(단수)가 동일한 역할로 중복 존재하던 문제를 해결한다.
기능이 완성된 /api/user/me(단수)를 유지하고, 최소 구현만 남아있던 /api/users/me(복수)를 삭제한다.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
talky-owl Ready Ready Preview, Comment Jun 20, 2026 5:54am

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: b4e3f816-caf8-4d28-8002-341c4b43fc6c

📥 Commits

Reviewing files that changed from the base of the PR and between 08816e4 and 6199c6f.

📒 Files selected for processing (2)
  • src/app/api/users/.gitkeep
  • src/app/api/users/me/route.ts
💤 Files with no reviewable changes (1)
  • src/app/api/users/me/route.ts

📝 Walkthrough

Walkthrough

src/app/api/users/me/route.ts에서 NextAuth 세션 기반 사용자 조회 GET 핸들러가 전체 삭제되었습니다. 인증 실패(401), 사용자 미존재(404), 서버 오류(500) 처리 로직과 UserMeDto 타입 및 관련 임포트가 모두 제거되었습니다.

Changes

Cohort / File(s) Summary
GET /api/users/me 라우트 제거
src/app/api/users/me/route.ts
GET() 익스포트, UserMeDto 및 모든 관련 임포트 포함 50줄 전체 삭제. 401/404/500 오류 응답 로직도 함께 제거됨.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🦉 토끼가 창고를 정리했네,
오래된 GET 라우트 쓱 치웠지.
세션도, DTO도, 에러 코드도—
먼지 털듯 깔끔히 비워냈다네.
빈 파일 위로 봄바람이 분다. 🌸

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning PR 설명은 요약, 배경, 테스트 계획을 포함하여 충분히 상세하지만, 저장소의 필수 템플릿 섹션들이 대부분 누락되어 있습니다. 공식 템플릿의 필수 섹션들(작업 내용, 담당 영역, Issue, 변경 사항, 테스트 결과, 작업 범위 확인 등)을 포함하여 설명을 작성해주세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 중복된 users/me API 라우트 제거라는 주요 변경 사항을 명확하고 간결하게 요약하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/remove-duplicate-users-api

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

@evenif99 evenif99 self-assigned this Jun 20, 2026
@evenif99
evenif99 merged commit 094b3e2 into dev Jun 20, 2026
3 checks passed
@evenif99
evenif99 deleted the refactor/remove-duplicate-users-api branch June 20, 2026 05:56
evenif99 added a commit that referenced this pull request Jun 20, 2026
/api/users/me(복수) 라우트가 dev에서 삭제(#89)되었으므로
해당 파일의 force-dynamic 추가 변경을 드롭하여 충돌 해결

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant