Conversation
1 task
🤖 GPT PR Review결론: request-changes 요약: 파싱 실패 주요 지적지적 없음 |
There was a problem hiding this comment.
Pull request overview
Adds a dedicated language-preference API that works for both guests (device-based) and logged-in users (user-based), and adjusts guest→member merge behavior to avoid overwriting an existing user language—aligning language resolution across the backend.
Changes:
- Added
GET/PATCH /api/users/languageto read/update language, usingUser.languagewhen authenticated andDevice.languagewhen unauthenticated (viaX-Device-Id). - Introduced a
LanguagePreferenceServiceplus request/response DTOs to centralize the branching logic. - Updated guest→user merge to only copy
Device.languagetoUser.languagewhen the user language is still unset.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/main/java/com/example/konnect_backend/global/config/WebSecurityConfig.java |
Allows unauthenticated access to /api/users/language to support guest flows. |
src/main/java/com/example/konnect_backend/domain/user/service/UserService.java |
Adds user-language read/write service methods. |
src/main/java/com/example/konnect_backend/domain/user/service/LanguagePreferenceService.java |
Implements the guest vs. logged-in language selection/update policy. |
src/main/java/com/example/konnect_backend/domain/user/service/DeviceService.java |
Adds device-language read/write helpers and deviceUuid validation; sets timestamps on device creation paths. |
src/main/java/com/example/konnect_backend/domain/user/dto/UpdateLanguageRequest.java |
Defines request payload for language update. |
src/main/java/com/example/konnect_backend/domain/user/dto/LanguageResponse.java |
Defines response payload indicating language + login state. |
src/main/java/com/example/konnect_backend/domain/user/controller/UserController.java |
Exposes the new language endpoints under /api/users. |
src/main/java/com/example/konnect_backend/domain/auth/service/DataMergeServiceImpl.java |
Prevents overwriting existing User.language during guest→member data merge. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
✨ Overview
사용자 언어 설정 API를 추가하고, 게스트 → 회원 전환 시 언어 병합 로직을 개선했습니다.
로그인 여부에 따라 언어 저장 위치를 분리하고, 로그인 이후에는 User.language를 기준으로 사용하도록 통일했습니다.
🔥 주요 변경
1. 언어 설정 API 추가
PATCH /api/users/language
GET /api/users/language
2. 언어 처리 정책 정리
3. DataMerge 로직 수정