Skip to content

[FIX/#290] 유저 프로필 관련 API 응답 구조 수정#296

Merged
oilbeaneda merged 10 commits into
developfrom
fix/#290-user_profile_api_fix
Mar 30, 2026
Merged

[FIX/#290] 유저 프로필 관련 API 응답 구조 수정#296
oilbeaneda merged 10 commits into
developfrom
fix/#290-user_profile_api_fix

Conversation

@oilbeaneda

@oilbeaneda oilbeaneda commented Mar 29, 2026

Copy link
Copy Markdown
Collaborator

Related issue 🛠

Work Description ✏️

유저의 최근 리뷰 통계 조회 API
유저의 최근 리뷰 목록 조회 API
다른 유저 정보 상세 조회 API

Screenshot 📸

Recording_2026-03-29-22-11-38.1.mp4

Uncompleted Tasks 😅

  • N/A

To Reviewers 📢

좋은밤 되세용

Summary by CodeRabbit

리팩토링

  • 사용자 프로필 조회, 리뷰 관리, 사용자 차단 등 여러 기능과 관련된 내부 식별자명을 정리하여 코드의 명확성, 일관성, 유지보수성을 개선했습니다.

@oilbeaneda oilbeaneda self-assigned this Mar 29, 2026
@oilbeaneda oilbeaneda added the 🔨 FIX 버그 수정 label Mar 29, 2026
@coderabbitai

coderabbitai Bot commented Mar 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c1e58d4e-a6e2-4d3e-9916-17446d0bc8b6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

사용자 프로필 및 리뷰 API 계층 전반에서 userId 매개변수를 userProfileId로 이름 변경합니다. 서비스 엔드포인트, 저장소 인터페이스, 데이터 소스, 프레젠테이션 계층의 UI 상태 모델 및 네비게이션 라우트에 걸쳐 적용됩니다.

Changes

Cohort / File(s) Summary
원격 서비스 계층
app/src/main/java/com/smashing/app/data/remote/service/ReviewService.kt, app/src/main/java/com/smashing/app/data/remote/service/UserService.kt
API 엔드포인트 경로 변수를 {userId}에서 {userProfileId}로 업데이트하고 @Path 바인딩 이름을 동일하게 변경합니다.
원격 데이터 소스 계층
app/src/main/java/com/smashing/app/data/remote/datasource/api/ReviewRemoteDataSource.kt, app/src/main/java/com/smashing/app/data/remote/datasource/impl/ReviewRemoteDataSourceImpl.kt
메서드 서명에서 매개변수를 userId에서 userProfileId로 변경하고 하위 서비스 호출 시 인자명을 업데이트합니다.
저장소 계층
app/src/main/java/com/smashing/app/data/repository/api/ReviewRepository.kt, app/src/main/java/com/smashing/app/data/repository/api/UserRepository.kt, app/src/main/java/com/smashing/app/data/repository/impl/ReviewRepositoryImpl.kt
인터페이스 및 구현 클래스의 메서드 서명에서 첫 번째 매개변수를 userId에서 userProfileId로 변경합니다.
프레젠테이션 라우트 & 네비게이션
app/src/main/java/com/smashing/app/presentation/profile/navigation/ProfileNavigation.kt
라우트 직렬화 모델 UserProfileReview의 필드를 userId에서 userProfileId로 변경하고 네비게이션 인자 전달을 업데이트합니다.
프레젠테이션 상태 모델
app/src/main/java/com/smashing/app/presentation/profile/review/ReviewContract.kt, app/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileContract.kt
상태 데이터 클래스의 userId 필드를 userProfileId로 변경하고 사이드이펙트 매개변수명을 업데이트합니다.
프레젠테이션 뷰모델 & 화면
app/src/main/java/com/smashing/app/presentation/profile/review/AllReviewViewModel.kt, app/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileViewModel.kt, app/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileScreen.kt
뷰모델에서 저장된 식별자를 userId에서 userProfileId로 변경하고 모든 관련 저장소 호출 및 네비게이션 인자를 업데이트합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • ShinHyeongcheol
  • seungjunGong
  • vahkjsdf
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 PR의 주요 변경 사항을 명확하게 설명하며, 유저 프로필 관련 API 응답 구조 수정이라는 핵심 내용을 잘 담고 있습니다.
Description check ✅ Passed PR 설명이 필수 템플릿 섹션을 모두 포함하고 있으나, 작업 내용이 API 목록만 있고 구체적인 수정 사항이 부족합니다.
Linked Issues check ✅ Passed PR의 코드 변경사항이 연결된 이슈 #290의 모든 세 가지 API 수정 목표(최근 리뷰 통계 조회, 최근 리뷰 목록 조회, 유저 정보 상세 조회)를 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 userId를 userProfileId로 일관되게 리팩토링하는 것으로, 이슈 #290의 API 응답 구조 수정 범위 내에 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#290-user_profile_api_fix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/Review route는 userProfileId로 바뀌었는데 navigateToUserProfilenavigateToReview는 아직 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

📥 Commits

Reviewing files that changed from the base of the PR and between f85387d and 538c797.

📒 Files selected for processing (13)
  • app/src/main/java/com/smashing/app/data/remote/datasource/api/ReviewRemoteDataSource.kt
  • app/src/main/java/com/smashing/app/data/remote/datasource/impl/ReviewRemoteDataSourceImpl.kt
  • app/src/main/java/com/smashing/app/data/remote/service/ReviewService.kt
  • app/src/main/java/com/smashing/app/data/remote/service/UserService.kt
  • app/src/main/java/com/smashing/app/data/repository/api/ReviewRepository.kt
  • app/src/main/java/com/smashing/app/data/repository/api/UserRepository.kt
  • app/src/main/java/com/smashing/app/data/repository/impl/ReviewRepositoryImpl.kt
  • app/src/main/java/com/smashing/app/presentation/profile/navigation/ProfileNavigation.kt
  • app/src/main/java/com/smashing/app/presentation/profile/review/AllReviewViewModel.kt
  • app/src/main/java/com/smashing/app/presentation/profile/review/ReviewContract.kt
  • app/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileContract.kt
  • app/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileScreen.kt
  • app/src/main/java/com/smashing/app/presentation/profile/userprofile/UserProfileViewModel.kt

@seungjunGong seungjunGong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

useId 에서 profileId 로 바뀌는 부분 확인해주시면 감사하겠습니다 ~~

Comment on lines 11 to 13
suspend fun getUserInfoDetail(
userId: String,
userProfileId: String,
sportCode: String?,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p1: 여기구 구현체 impl 쪽은 파라미터 명이 안바뀐거 같은데 확인 부탁드립니다!

@oilbeaneda oilbeaneda requested a review from seungjunGong March 30, 2026 00:32

@vahkjsdf vahkjsdf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

굿굿 수고하셨어용

@ShinHyeongcheol ShinHyeongcheol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

뀼뀼 수고했습니다ㅏㅏ

@seungjunGong seungjunGong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

구웃 !

@oilbeaneda oilbeaneda merged commit a191e93 into develop Mar 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 FIX 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 유저 프로필/ 유저 리뷰 관련 API 응답구조 수정

4 participants