[FIX/#290] 유저 프로필 관련 API 응답 구조 수정#296
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Walkthrough사용자 프로필 및 리뷰 API 계층 전반에서 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
app/src/main/java/com/smashing/app/data/remote/service/ReviewService.kt (1)
22-23:@Path대상 파라미터 변수명도userProfileId로 맞추는 것을 권장합니다.현재 경로 토큰은
userProfileId인데 변수명만userId로 남아 있어, 추후 읽을 때 의미 혼동이 생길 수 있습니다. 동일 명칭으로 통일해두면 유지보수가 더 수월합니다.제안 diff
suspend fun getUserRecentReviewList( `@Path`("userProfileId") - userId: String, + userProfileId: String, `@Query`("sportCode") sportCode: String?,🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/src/main/java/com/smashing/app/data/remote/service/ReviewService.kt` around lines 22 - 23, The `@Path`("userProfileId") parameter in ReviewService is declared as userId which causes a naming mismatch; rename the parameter from userId to userProfileId in the method signature where `@Path`("userProfileId") is used (in ReviewService) and update any references/implementations and call sites to the new name so the annotation and parameter name match for clarity and maintainability.app/src/main/java/com/smashing/app/presentation/profile/navigation/ProfileNavigation.kt (1)
90-99: 네비게이션 헬퍼의 공개 파라미터명도 같이 정리해두는 게 좋겠습니다.
UserProfile/Reviewroute는userProfileId로 바뀌었는데navigateToUserProfile와navigateToReview는 아직userId를 노출하고 있습니다. 지금처럼 route 모델과 helper API가 다른 이름을 쓰면 호출부에서 어떤 ID를 전달하는지 계속 헷갈리므로, 공개 시그니처도 이번 rename에 맞춰 같이 바꿔두는 편이 낫습니다.패치 예시
fun NavController.navigateToUserProfile( - userId: String, + userProfileId: String, sportCode: String? = null, navOptions: NavOptions? = null, -) = navigate(UserProfile(userId, sportCode), navOptions) +) = navigate( + UserProfile( + userProfileId = userProfileId, + sportCode = sportCode, + ), + navOptions, +) fun NavController.navigateToReview( - userId: String? = null, + userProfileId: String? = null, sportCode: String? = null, navOptions: NavOptions? = null, -) = navigate(Review(userId, sportCode), navOptions) +) = navigate( + Review( + userProfileId = userProfileId, + sportCode = sportCode, + ), + navOptions, +)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/src/main/java/com/smashing/app/presentation/profile/navigation/ProfileNavigation.kt` around lines 90 - 99, The public navigation helper parameter names are inconsistent with the renamed route models: update the signatures of navigateToUserProfile(...) and navigateToReview(...) to use userProfileId instead of userId so they match the Route data classes UserProfile and Review; change all occurrences of the parameter name (declarations and call sites within the file) to userProfileId to keep the API and model aligned.app/src/main/java/com/smashing/app/data/remote/service/UserService.kt (1)
12-15:@Path주석과 Kotlin 파라미터명을 모두userProfileId로 통일하세요.현재
@Path("userProfileId")는 올바르지만, 메서드 파라미터는 여전히userId입니다. 런타임에는 Retrofit이 주석 값으로 경로를 바인딩하므로 동작하지만, 레이어 간 이름이 일치하지 않습니다. 상위 레이어의 저장소 인터페이스는 이미userProfileId를 사용 중이고, 호출자들도 이 이름으로 명명된 인자를 전달합니다. 두 메서드 모두 파라미터명을userProfileId로 변경하면 명확성과 일관성이 향상됩니다.제안 패치
suspend fun getUserInfoDetail( `@Path`("userProfileId") - userId: String, + userProfileId: String, `@Query`("sportCode") sportCode: String?, ): BaseResponse<GetUserInfoDetailResponse> suspend fun getUserRecentReviewStats( `@Path`("userProfileId") - userId: String, + userProfileId: String, `@Query`("sportCode") sportCode: String?, ): BaseResponse<GetUserRecentReviewStatsResponse>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/src/main/java/com/smashing/app/data/remote/service/UserService.kt` around lines 12 - 15, Rename the parameter in the Retrofit service method getUserInfoDetail so the Kotlin parameter name matches the `@Path` key: change the parameter currently named userId to userProfileId; update the function signature for getUserInfoDetail and any references in that file to use userProfileId to keep the `@Path`("userProfileId") annotation and call sites consistent with the repository and callers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@app/src/main/java/com/smashing/app/data/remote/datasource/impl/ReviewRemoteDataSourceImpl.kt`:
- Around line 21-29: Change the ReviewService.getUserRecentReviewList method
parameter name from userId to userProfileId so it matches the rest of the
layers; update the function signature in ReviewService (the suspend fun
getUserRecentReviewList with `@Path`("userProfileId")) to accept userProfileId:
String and keep all other parameters unchanged, then update any direct calls
(e.g., ReviewRemoteDataSourceImpl.getUserRecentReviewList which currently passes
userProfileId into reviewService.getUserRecentReviewList) to use the renamed
parameter (this is just a parameter name change—no behavior change required).
---
Nitpick comments:
In `@app/src/main/java/com/smashing/app/data/remote/service/ReviewService.kt`:
- Around line 22-23: The `@Path`("userProfileId") parameter in ReviewService is
declared as userId which causes a naming mismatch; rename the parameter from
userId to userProfileId in the method signature where `@Path`("userProfileId") is
used (in ReviewService) and update any references/implementations and call sites
to the new name so the annotation and parameter name match for clarity and
maintainability.
In `@app/src/main/java/com/smashing/app/data/remote/service/UserService.kt`:
- Around line 12-15: Rename the parameter in the Retrofit service method
getUserInfoDetail so the Kotlin parameter name matches the `@Path` key: change the
parameter currently named userId to userProfileId; update the function signature
for getUserInfoDetail and any references in that file to use userProfileId to
keep the `@Path`("userProfileId") annotation and call sites consistent with the
repository and callers.
In
`@app/src/main/java/com/smashing/app/presentation/profile/navigation/ProfileNavigation.kt`:
- Around line 90-99: The public navigation helper parameter names are
inconsistent with the renamed route models: update the signatures of
navigateToUserProfile(...) and navigateToReview(...) to use userProfileId
instead of userId so they match the Route data classes UserProfile and Review;
change all occurrences of the parameter name (declarations and call sites within
the file) to userProfileId to keep the API and model aligned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 91020bc8-7d31-4d7b-96f0-91078445b174
📒 Files selected for processing (13)
app/src/main/java/com/smashing/app/data/remote/datasource/api/ReviewRemoteDataSource.ktapp/src/main/java/com/smashing/app/data/remote/datasource/impl/ReviewRemoteDataSourceImpl.ktapp/src/main/java/com/smashing/app/data/remote/service/ReviewService.ktapp/src/main/java/com/smashing/app/data/remote/service/UserService.ktapp/src/main/java/com/smashing/app/data/repository/api/ReviewRepository.ktapp/src/main/java/com/smashing/app/data/repository/api/UserRepository.ktapp/src/main/java/com/smashing/app/data/repository/impl/ReviewRepositoryImpl.ktapp/src/main/java/com/smashing/app/presentation/profile/navigation/ProfileNavigation.ktapp/src/main/java/com/smashing/app/presentation/profile/review/AllReviewViewModel.ktapp/src/main/java/com/smashing/app/presentation/profile/review/ReviewContract.ktapp/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileContract.ktapp/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileScreen.ktapp/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileViewModel.kt
seungjunGong
left a comment
There was a problem hiding this comment.
useId 에서 profileId 로 바뀌는 부분 확인해주시면 감사하겠습니다 ~~
| suspend fun getUserInfoDetail( | ||
| userId: String, | ||
| userProfileId: String, | ||
| sportCode: String?, |
There was a problem hiding this comment.
p1: 여기구 구현체 impl 쪽은 파라미터 명이 안바뀐거 같은데 확인 부탁드립니다!
Related issue 🛠
Work Description ✏️
유저의 최근 리뷰 통계 조회 API
유저의 최근 리뷰 목록 조회 API
다른 유저 정보 상세 조회 API
Screenshot 📸
Recording_2026-03-29-22-11-38.1.mp4
Uncompleted Tasks 😅
To Reviewers 📢
좋은밤 되세용
Summary by CodeRabbit
리팩토링