Repository navigation
feat: name/nickname 표시 정책 적용 #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
7755a9e
3e42ccc
aca6cc9
1643b52
4866978
b3f2002
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -333,7 +333,8 @@ YYYY-MM-DDTHH:mm:ssZ | |
| "success": true, | ||
| "data": { | ||
| "id": "uuid", | ||
| "nickname": "string", | ||
| "name": "string | null", | ||
| "nickname": "string | null", | ||
| "profileImageUrl": "string | null", | ||
| "gender": "male | female | other | unknown | no_answer | null", | ||
| "ageGroup": "under_10 | teens | twenties | thirties | forties | fifties | sixties_plus | unknown | no_answer | null", | ||
|
|
@@ -354,6 +355,7 @@ YYYY-MM-DDTHH:mm:ssZ | |
|
|
||
| - **처리 정책:** | ||
| - 본인 정보만 조회 가능 | ||
| - `name`이 있으면 name 우선 표시, null이면 nickname 표시 | ||
| - `deletedAt`이 있는 탈퇴 계정 처리 기준 확정 필요 | ||
| - MVP에서 `profileImageUrl`은 카카오 프로필 이미지 URL 그대로 반환 (Supabase Storage 미사용) | ||
| - **확정 필요:** | ||
|
|
@@ -370,7 +372,8 @@ YYYY-MM-DDTHH:mm:ssZ | |
|
|
||
| ```json | ||
| { | ||
| "nickname": "string (optional)", | ||
| "name": "string (optional, 1~50자)", | ||
| "nickname": "string (optional, 2~20자)", | ||
|
Comment on lines
+375
to
+376
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PATCH 요청/응답 명세가 현재 서버 검증 로직과 맞지 않습니다. Line 375-376, Line 390-391 기준으로 Also applies to: 390-391 🤖 Prompt for AI Agents |
||
| "gender": "male | female | other | no_answer (optional)", | ||
| "ageGroup": "string (optional)", | ||
| "mbti": "string (optional, 4자)" | ||
|
|
@@ -384,7 +387,8 @@ YYYY-MM-DDTHH:mm:ssZ | |
| "success": true, | ||
| "data": { | ||
| "id": "uuid", | ||
| "nickname": "string", | ||
| "name": "string | null", | ||
| "nickname": "string | null", | ||
| "gender": "string | null", | ||
| "ageGroup": "string | null", | ||
| "mbti": "string | null" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GET 응답 명세와 실제 구현 DTO가 불일치합니다.
Line 336-337, Line 358에서
name을 응답 계약에 추가했지만, 제공된 구현 스니펫(src/app/api/users/me/route.ts:8-41)은name을 조회/반환하지 않습니다. 현재 상태면 name 우선 표시 정책이 서버 응답에서 성립하지 않습니다.예시 수정안 (서버 구현 동기화)
interface UserMeDto { id: string + name: string | null nickname: string | null mbti: string | null } const user = await prisma.user.findUnique({ where: { id: userId }, - select: { id: true, nickname: true, mbti: true }, + select: { id: true, name: true, nickname: true, mbti: true }, }) return NextResponse.json<ApiResponse<UserMeDto>>({ success: true, - data: { id: user.id, nickname: user.nickname, mbti: user.mbti }, + data: { id: user.id, name: user.name, nickname: user.nickname, mbti: user.mbti }, })Also applies to: 358-358
🤖 Prompt for AI Agents