fix: Prisma schema 중복 UserTermsAgreement 모델 제거 - #77
Merged
Conversation
feat(user): 마이페이지 프로필 편집 및 이미지 업로드 구현 - 마이페이지 편집 페이지 UI 및 프로필 수정 로직 구현 - 프로필 이미지 업로드 API (Supabase Storage 연동) - user/me API에 PATCH 메서드 추가 (닉네임, MBTI 수정) - user 도메인 API client, hooks, constants 구성 - auth constants 및 lib/storage 유틸 추가 - API 명세서 업데이트 - dev 최신 반영 (사건기록, 홈 화면 개선) Co-Authored-By: Claude <noreply@anthropic.com> @
nickname 컬럼이 VarChar(100)이므로 검증 상한을 20자에서 100자로 수정. 서버 검증(route.ts)과 클라이언트 검증(edit page) 모두 반영. Co-Authored-By: Claude <noreply@anthropic.com>
- Stylelint declaration-empty-line-before 규칙 위반 해소 - 프로필 이미지 업로드 시 매직 바이트 검증 추가 - 스토리지 업로드 후 DB 실패 시 보상 삭제 처리 - PATCH 요청 JSON 파싱 실패 시 400 응답 분기 - PATCH 사용자 미존재 시 404 응답 추가 - 약관 동의 createMany에 skipDuplicates 적용 - UserTermsAgreement 모델에 unique 제약 추가 Co-Authored-By: Claude <noreply@anthropic.com>
- src/stores/profileEditStore.ts 신규 생성 - page.tsx에서 useState 5개를 Zustand store로 이관 - setFieldError/clearFieldError 액션으로 에러 처리 단순화 Co-Authored-By: Claude <noreply@anthropic.com>
- isError와 !user 에러 메시지 분리 - 프로필 이미지 accept에 SVG 추가 (프론트/백엔드 동시 적용) - errors.general 인라인 스타일을 SCSS Module 클래스로 이관 Co-Authored-By: Claude <noreply@anthropic.com>
- PATCH를 multipart/form-data 기반으로 변경 - 텍스트 필드(email, nickname, mbti) + 이미지 파일을 한 번에 처리 - Supabase Storage 업로드 로직을 PATCH에 통합 - 별도 profile-image 엔드포인트 삭제 - 프론트 hooks에서 useUploadProfileImage 제거, 단일 호출로 단순화 Co-Authored-By: Claude <noreply@anthropic.com>
merge 충돌 해결 과정에서 UserTermsAgreement 모델이 중복 삽입되고 닫는 괄호가 누락되어 Prisma validation 에러 발생. 675~691행의 중복 블록을 제거하고 68행의 정상 선언만 유지. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthrough사용자 프로필 편집 기능(이메일/닉네임/MBTI/이미지 업로드)을 추가하고, Supabase Storage 클라이언트를 초기화합니다. 최초 로그인 시 약관 동의 레코드를 트랜잭션으로 생성하도록 변경하며 백필 스크립트도 추가합니다. 방 초대 참여 API 명세를 토큰 기반으로 전환합니다. Changes프로필 편집 기능
약관 동의 레코드 생성
방 초대 API 문서 갱신
Sequence Diagram(s)sequenceDiagram
participant User as 사용자 (브라우저)
participant ProfileEditPage as ProfileEditPage
participant PATCH_API as PATCH /api/user/me
participant SupabaseStorage as Supabase Storage
participant Prisma as Prisma (DB)
rect rgba(99, 179, 237, 0.5)
Note over User,ProfileEditPage: 폼 입력 & 클라이언트 검증
User->>ProfileEditPage: 폼 제출 (이메일/닉네임/MBTI/이미지)
ProfileEditPage->>ProfileEditPage: 클라이언트 검증 (이메일 정규식, 닉네임 길이)
end
rect rgba(154, 230, 180, 0.5)
Note over ProfileEditPage,Prisma: 서버 처리
ProfileEditPage->>PATCH_API: multipart/form-data PATCH
PATCH_API->>PATCH_API: formData 파싱 & 필드 검증
alt profileImage 존재
PATCH_API->>PATCH_API: 바이트 시그니처 검사
PATCH_API->>SupabaseStorage: 이미지 업서트
SupabaseStorage-->>PATCH_API: 공개 URL 반환
end
PATCH_API->>Prisma: user.update(변경된 필드)
Prisma-->>PATCH_API: 업데이트된 UserProfile
PATCH_API-->>ProfileEditPage: UserProfile 응답
end
rect rgba(251, 211, 141, 0.5)
Note over ProfileEditPage,User: 캐시 갱신 & 네비게이션
ProfileEditPage->>ProfileEditPage: invalidateQueries(USER_ME_KEY)
ProfileEditPage->>User: router.back()
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UserTermsAgreement모델이 중복 삽입되고 닫는}누락Validation Error Count: 6) 해결Test plan
UserTermsAgreement선언이 1개만 존재하는지 확인🤖 Generated with Claude Code
Summary by CodeRabbit
릴리스 노트
New Features
Documentation