Skip to content

[Feat/#8]1 상세화면 v3 api 업데이트 및 iOS 평가 사진 업로드 안되는 이슈 수정#82

Open
imtaejugkim wants to merge 2 commits into
developfrom
feat/#81-detail-v3-api
Open

[Feat/#8]1 상세화면 v3 api 업데이트 및 iOS 평가 사진 업로드 안되는 이슈 수정#82
imtaejugkim wants to merge 2 commits into
developfrom
feat/#81-detail-v3-api

Conversation

@imtaejugkim
Copy link
Copy Markdown
Contributor

@imtaejugkim imtaejugkim commented Apr 19, 2026

개요


PR 유형

해당하는 항목에 체크해주세요.

  • Add — 리소스/코드/컴포넌트 추가 (기능 변화 없음)
  • Feat — 사용자에게 보이는 새로운 기능 추가
  • Fix — 버그 수정
  • Refactor — 기능 변경 없는 코드 구조 개선
  • Docs / Comment — 문서, 주석 수정
  • Test — 테스트 추가 또는 리팩토링
  • Build / Config — 빌드, 의존성, 설정 변경
  • File — 파일 / 폴더 구조 변경

변경 사항

  • 상세화면 v3 api 업데이트
  • iOS 평가 사진 업로드 안되는 이슈 수정

📸 화면 / 영상 (선택)

Before

After


리뷰어에게 전달할 사항

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 음식점 상세 정보 페이지에서 제휴 정보 표시 복구
    • 리뷰 이미지 업로드 처리 개선
    • 백엔드 API 통신 업데이트

@imtaejugkim imtaejugkim self-assigned this Apr 19, 2026
@imtaejugkim imtaejugkim added Feat 기존 기능 개선 / 동작 변경 AI Review Request coderabbitai 리뷰 요청 labels Apr 19, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

📝 Walkthrough

Walkthrough

이 변경 사항은 세 가지 주요 업데이트로 구성됩니다: DetailApi에서 모든 HTTP 엔드포인트 경로를 /api/v2/에서 /api/v3/로 변경하고, EvaluateApi의 멀티파트 이미지 업로드 처리를 ByteReadPacket을 사용하도록 개선하며, DetailRestInfo 컴포넌트에서 제휴정보 섹션을 재활성화하고 빈 값에 대한 폴백 메시지를 추가합니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 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 제목이 상세화면 V3 API 업데이트 및 iOS 평가 사진 업로드 문제 해결이라는 주요 변경사항을 명확히 요약하고 있습니다.
Description check ✅ Passed PR 설명이 필수 템플릿 섹션(개요, PR 유형, 변경사항)을 포함하고 있으며, #81 이슈를 참조하고 있습니다.
Linked Issues check ✅ Passed DetailApi의 v3 API 경로 업데이트, EvaluateApi의 이미지 업로드 처리 개선, DetailRestInfo의 제휴정보 활성화로 #81의 V3 API 업데이트 목표를 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항(DetailApi v3 경로 업데이트, iOS 이미지 업로드 수정, 제휴정보 UI 활성화)이 #81 이슈의 범위 내입니다.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#81-detail-v3-api

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
shared/data/detail/src/commonMain/kotlin/com/kus/kustaurant/detail/api/DetailApi.kt (1)

25-25: API 버전 prefix를 상수로 분리하면 다음 버전 변경 누락 위험을 줄일 수 있습니다.

현재 /api/v3가 여러 엔드포인트에 반복되어 있어 이후 /api/v4 등으로 변경할 때 일부 라인만 빠질 가능성이 있습니다. 이번처럼 버전 prefix만 일괄 변경되는 구조라면 private companion object 상수로 두는 편이 더 안전합니다.

♻️ 제안 diff
 class DetailApi(
     private val client: HttpClient,
 ) {
+    private companion object {
+        const val API_V3 = "/api/v3"
+    }
+
     suspend fun getRestaurantDetail(restaurantId: Long): DetailResponse {
-        return client.get("/api/v3/restaurants/$restaurantId").body()
+        return client.get("$API_V3/restaurants/$restaurantId").body()
     }
 
     suspend fun getRestaurantReviews(
         restaurantId: Long,
         sort: String = "POPULARITY"
     ): List<ReviewResponse> {
-        return client.get("/api/v3/restaurants/$restaurantId/comments") {
+        return client.get("$API_V3/restaurants/$restaurantId/comments") {
             parameter("sort", sort)
         }.body()
     }
 
     suspend fun putEvaluationReaction(
         evaluationId: Int,
         reaction: String?,
     ): EvaluationReactionResponse {
-        return client.put("/api/v3/auth/restaurants/evaluations/$evaluationId/reaction") {
+        return client.put("$API_V3/auth/restaurants/evaluations/$evaluationId/reaction") {
             reaction?.let { parameter("reaction", it) }
         }.body()
     }
 
     suspend fun putCommentReaction(
         evalCommentId: Int,
         reaction: String?,
     ): CommentReactionResponse {
-        return client.put("/api/v3/auth/eval-comments/$evalCommentId") {
+        return client.put("$API_V3/auth/eval-comments/$evalCommentId") {
             reaction?.let { parameter("reaction", it) }
         }.body()
     }
 
     suspend fun putRestaurantFavorite(restaurantId: Long): FavoriteResponse {
-        return client.put("/api/v3/auth/restaurants/$restaurantId/favorite").body()
+        return client.put("$API_V3/auth/restaurants/$restaurantId/favorite").body()
     }
 
     suspend fun deleteRestaurantFavorite(restaurantId: Long): FavoriteResponse {
-        return client.delete("/api/v3/auth/restaurants/$restaurantId/favorite").body()
+        return client.delete("$API_V3/auth/restaurants/$restaurantId/favorite").body()
     }
 
     suspend fun postComment(
         restaurantId: Long,
         evalId: Int,
         body: String,
     ): ReviewCommentResponse {
-        return client.post("/api/v3/auth/restaurants/$restaurantId/comments/$evalId") {
+        return client.post("$API_V3/auth/restaurants/$restaurantId/comments/$evalId") {
             contentType(ContentType.Application.Json)
             setBody(PostCommentRequest(body))
         }.body()
     }
 
     suspend fun deleteComment(
         restaurantId: Long,
         evalCommentId: Int,
     ) {
-        client.delete("/api/v3/auth/restaurants/$restaurantId/comments/$evalCommentId").body<Unit>()
+        client.delete("$API_V3/auth/restaurants/$restaurantId/comments/$evalCommentId").body<Unit>()
     }
 }

Also applies to: 32-34, 41-43, 50-52, 56-60, 68-71, 78-78

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@shared/data/detail/src/commonMain/kotlin/com/kus/kustaurant/detail/api/DetailApi.kt`
at line 25, Extract the repeated "/api/v3" string into a single constant in the
DetailApi class (e.g., a private companion object val API_PREFIX = "/api/v3")
and update all client.get/post calls (the occurrences that currently use
"/api/v3/..." such as the call that returns
client.get("/api/v3/restaurants/$restaurantId").body()) to build paths using
that constant (e.g., "$API_PREFIX/restaurants/..."); apply the same replacement
for the other occurrences mentioned (lines 32-34, 41-43, 50-52, 56-60, 68-71,
78) so future version changes require changing only the constant.
shared/feature/detail/src/commonMain/kotlin/com/kus/feature/detail/component/DetailRestInfo.kt (1)

172-177: 하드코딩된 문자열을 string resource로 이동 권장

"제휴 정보 없음" 문자열이 하드코딩되어 있습니다. 다른 UI 문구들처럼 stringResource로 옮기어 다국어 지원 및 문구 관리 일관성을 맞추시기 바랍니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@shared/feature/detail/src/commonMain/kotlin/com/kus/feature/detail/component/DetailRestInfo.kt`
around lines 172 - 177, The hardcoded Korean string "제휴 정보 없음" should be
replaced with a string resource; update the call to DetailRestInfoMore (where
content = partnershipInfo.ifBlank { "제휴 정보 없음" }) to use
stringResource(R.string.<name>) inside the ifBlank fallback instead of the
literal, add the corresponding entry in your strings resource file (e.g.,
<string name="no_partnership_info">제휴 정보 없음</string>), and import
androidx.compose.ui.res.stringResource so the stringResource call resolves in
DetailRestInfo.kt.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@shared/data/detail/src/commonMain/kotlin/com/kus/kustaurant/detail/api/DetailApi.kt`:
- Line 25: Extract the repeated "/api/v3" string into a single constant in the
DetailApi class (e.g., a private companion object val API_PREFIX = "/api/v3")
and update all client.get/post calls (the occurrences that currently use
"/api/v3/..." such as the call that returns
client.get("/api/v3/restaurants/$restaurantId").body()) to build paths using
that constant (e.g., "$API_PREFIX/restaurants/..."); apply the same replacement
for the other occurrences mentioned (lines 32-34, 41-43, 50-52, 56-60, 68-71,
78) so future version changes require changing only the constant.

In
`@shared/feature/detail/src/commonMain/kotlin/com/kus/feature/detail/component/DetailRestInfo.kt`:
- Around line 172-177: The hardcoded Korean string "제휴 정보 없음" should be replaced
with a string resource; update the call to DetailRestInfoMore (where content =
partnershipInfo.ifBlank { "제휴 정보 없음" }) to use stringResource(R.string.<name>)
inside the ifBlank fallback instead of the literal, add the corresponding entry
in your strings resource file (e.g., <string name="no_partnership_info">제휴 정보
없음</string>), and import androidx.compose.ui.res.stringResource so the
stringResource call resolves in DetailRestInfo.kt.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 649419da-4a62-457b-99da-530f4f59c8ec

📥 Commits

Reviewing files that changed from the base of the PR and between 0e802d6 and 3f5bd78.

📒 Files selected for processing (3)
  • shared/data/detail/src/commonMain/kotlin/com/kus/kustaurant/detail/api/DetailApi.kt
  • shared/data/evaluate/src/commonMain/kotlin/com/kus/kustaurant/evaluate/api/EvaluateApi.kt
  • shared/feature/detail/src/commonMain/kotlin/com/kus/feature/detail/component/DetailRestInfo.kt

Copy link
Copy Markdown
Collaborator

@BeomBeom2 BeomBeom2 left a comment

Choose a reason for hiding this comment

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

확인했습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Review Request coderabbitai 리뷰 요청 Feat 기존 기능 개선 / 동작 변경

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 상세 화면 V3 API 업데이트

2 participants