Skip to content

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

Merged
ji2081 merged 5 commits into
developfrom
feat/74-user-me
Nov 16, 2026
Merged

ji2081 merged 5 commits 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 previously approved these changes Nov 9, 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 쪽에서 값을 넘기는 방향으로 가야 할 것 같습니다

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

이슈 #105로 남기고 TODO에 번호를 달았습니다. 순환 참조는 말씀해 주신 대로 그 이슈에서 조합 서비스로 빼거나 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.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

다른 컨트롤러처럼 결과를 변수로 받은 뒤 응답을 만들도록 변경했습니다.

# Conflicts:
#	src/main/java/com/sniptext/domain/user/service/UserQueryService.java

@oTAETAEo oTAETAEo 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.

고생하셨습니다아 👍

@ji2081
ji2081 merged commit ad50a22 into develop Nov 16, 2026
2 checks passed
@ji2081
ji2081 deleted the feat/74-user-me branch November 16, 2026 02:44
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

3 participants