Merged
Conversation
- 아기 정보 수정 API에서 Multipart 이미지 제거, JSON 기반으로 수정 - BabyUpdateRequest의 필드(name, dueDate)만 처리하도록 변경
- foundToken.getUser() 호출 시 Lazy 로딩된 User 객체가 컨트롤러에서 접근되며 예외 발생 - userRepository를 통해 User를 명시적으로 다시 조회하여 영속성 컨텍스트 내에서 처리 - 서버 환경에서도 안정적으로 accessToken 재발급되도록 수정
- saveOrLoginUser 메서드에서 신규 가입 여부를 판단하는 isNewUser 로직 추가 - OAuth2 로그인 성공 시 signed: true/false 값 포함하여 프론트로 전달 - signed=true: 기존 회원 - signed=false: 신규 가입자
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.
🚀 소셜 로그인 개선 및 오류 수정
📌 주요 변경 사항 요약
1️⃣ 소셜 로그인 응답 개선
/api/auth/tokens응답에signed필드 추가true: 기존 회원false: 새로 가입한 유저✅ 응답 예시
{ "accessToken": "xxx.yyy.zzz", "refreshToken": "aaa.bbb.ccc", "signed": true, "message": "로그인 성공" }2️⃣ LazyInitializationException 해결
🐛 문제
foundToken.getUser()호출 시LazyInitializationException발생✅ 해결 방법
userRepository.findById(user.getId())로 사용자 명시적 재조회3️⃣ 아기 프로필 이미지 제거
BabyRegisterRequest,BabyUpdateRequest,BabyResponseDTO에서 다음 필드 제거:MultipartFile imageprofileImage관련 Swagger 테스트용 Multipart API 및 이미지 처리 로직 제거