Skip to content

feat: 내 정보 조회 API (#74) - #75

Open
ji2081 wants to merge 1 commit into
developfrom
feat/74-user-me
Open

ji2081 wants to merge 1 commit into
developfrom
feat/74-user-me

Conversation

@ji2081

@ji2081 ji2081 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

관련 이슈

작업 내용

  • GET /api/v1/users/me (명세 5번)
  • 회원 번호, 닉네임, 이메일, 프로필 이미지, 로그인 방식 조회

명세와 달라진 점

없음

테스트

전체 ./gradlew build 통과

  • 응답 필드, 캐시 금지
  • 프로필 이미지 없으면 null
  • 탈퇴한 회원·없는 회원의 토큰은 USER404_1
  • 토큰 없으면 COMMON401_1
  • ?userId=로 다른 회원을 지정해도 토큰의 회원 정보만 내려줌

확인 체크리스트

  • ./gradlew build 통과
  • 테스트 포함
  • 변경 400줄 안팎 (운영 103, 테스트 105)
  • 병합된 마이그레이션 수정 안 함
  • 비밀 값·개인정보 없음
  • global 공통 코드 수정 없음

리뷰어에게

  • loginType은 S1이 구글만이라 GOOGLE로 고정했습니다. 제공자가 늘면 소셜 계정에서 읽도록 바꿉니다.
  • #71과 UserQueryService에 각각 메서드를 추가해서, 병합 순서에 따라 작은 충돌이 날 수 있습니다.

@ji2081 ji2081 self-assigned this Nov 5, 2026
@ji2081 ji2081 added feature 기능 개발 user 내 정보·사용량·플랜 판정 labels Nov 5, 2026
@ji2081 ji2081 changed the title feat: 내 정보 조회 API 구현 (#74) feat: 내 정보 조회 API (#74) Nov 5, 2026

@chjpooh2002 chjpooh2002 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 확인 부탁드립니다~~

Comment on lines +13 to +15
public static UserDetailResult from(User user) {
return new UserDetailResult(user.getId(), user.getNickname(), user.getEmail(), user.getProfileImageUrl(),
SocialProvider.GOOGLE);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나중에 네이버를 추가할 때 여기를 놓치면 네이버 회원도 GOOGLE로 내려가요. 주석 대신 이슈 번호를 단 TODO로 남겨주시면 좋겠습니다! 그리고 나중에 소셜 계정에서 읽으려면 user가 auth를 부르게 되는데, 지금은 auth가 user를 부르고 있어서(signUp, recordLogin) 그대로 하면 순환이 생겨요. 그때는 조합 서비스로 빼거나 auth 쪽에서 값을 넘기는 방향으로 가야 할 것 같습니다


@GetMapping("/me")
public ResponseEntity<ApiResponse<UserDetailResponse>> getMe(@LoginUser Long userId) {
return ApiResponse.success(UserSuccessCode.USER_FOUND, UserDetailResponse.from(userQueryService.getDetail(userId)));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(사소) 다른 컨트롤러처럼 서비스 결과를 변수로 받은 뒤 응답을 만드는 모양으로 맞춰주시면 좋겠습니다!

@chjpooh2002 chjpooh2002 mentioned this pull request Nov 9, 2026
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 기능 개발 user 내 정보·사용량·플랜 판정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 내 정보 조회 API

2 participants