From 814d6719008d86f2964c4da9bc0e2b564093b939 Mon Sep 17 00:00:00 2001 From: TaejungKim <92737123+imtaejugkim@users.noreply.github.com> Date: Sun, 19 Apr 2026 21:48:40 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[feat/#81]=20=EC=83=81=EC=84=B8=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20v3=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A0=9C=ED=9C=B4=EC=A0=95=EB=B3=B4=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kus/kustaurant/detail/api/DetailApi.kt | 16 ++++++++-------- .../feature/detail/component/DetailRestInfo.kt | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/shared/data/detail/src/commonMain/kotlin/com/kus/kustaurant/detail/api/DetailApi.kt b/shared/data/detail/src/commonMain/kotlin/com/kus/kustaurant/detail/api/DetailApi.kt index 6f18cd57..b9e492fd 100644 --- a/shared/data/detail/src/commonMain/kotlin/com/kus/kustaurant/detail/api/DetailApi.kt +++ b/shared/data/detail/src/commonMain/kotlin/com/kus/kustaurant/detail/api/DetailApi.kt @@ -22,14 +22,14 @@ class DetailApi( private val client: HttpClient, ) { suspend fun getRestaurantDetail(restaurantId: Long): DetailResponse { - return client.get("/api/v2/restaurants/$restaurantId").body() + return client.get("/api/v3/restaurants/$restaurantId").body() } suspend fun getRestaurantReviews( restaurantId: Long, sort: String = "POPULARITY" ): List { - return client.get("/api/v2/restaurants/$restaurantId/comments") { + return client.get("/api/v3/restaurants/$restaurantId/comments") { parameter("sort", sort) }.body() } @@ -38,7 +38,7 @@ class DetailApi( evaluationId: Int, reaction: String?, ): EvaluationReactionResponse { - return client.put("/api/v2/auth/restaurants/evaluations/$evaluationId/reaction") { + return client.put("/api/v3/auth/restaurants/evaluations/$evaluationId/reaction") { reaction?.let { parameter("reaction", it) } }.body() } @@ -47,17 +47,17 @@ class DetailApi( evalCommentId: Int, reaction: String?, ): CommentReactionResponse { - return client.put("/api/v2/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/v2/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/v2/auth/restaurants/$restaurantId/favorite").body() + return client.delete("/api/v3/auth/restaurants/$restaurantId/favorite").body() } suspend fun postComment( @@ -65,7 +65,7 @@ class DetailApi( evalId: Int, body: String, ): ReviewCommentResponse { - return client.post("/api/v2/auth/restaurants/$restaurantId/comments/$evalId") { + return client.post("/api/v3/auth/restaurants/$restaurantId/comments/$evalId") { contentType(ContentType.Application.Json) setBody(PostCommentRequest(body)) }.body() @@ -75,6 +75,6 @@ class DetailApi( restaurantId: Long, evalCommentId: Int, ) { - client.delete("/api/v2/auth/restaurants/$restaurantId/comments/$evalCommentId").body() + client.delete("/api/v3/auth/restaurants/$restaurantId/comments/$evalCommentId").body() } } diff --git a/shared/feature/detail/src/commonMain/kotlin/com/kus/feature/detail/component/DetailRestInfo.kt b/shared/feature/detail/src/commonMain/kotlin/com/kus/feature/detail/component/DetailRestInfo.kt index 8e62bdc3..ad73135a 100644 --- a/shared/feature/detail/src/commonMain/kotlin/com/kus/feature/detail/component/DetailRestInfo.kt +++ b/shared/feature/detail/src/commonMain/kotlin/com/kus/feature/detail/component/DetailRestInfo.kt @@ -169,12 +169,12 @@ fun DetailRestInfo( modifier = Modifier.padding(top = 20.dp) ) -// DetailRestInfoMore( -// title = "제휴정보", -// content = partnershipInfo, -// enableSeeMore = true, -// modifier = Modifier.padding(top = 12.dp) -// ) + DetailRestInfoMore( + title = "제휴정보", + content = partnershipInfo.ifBlank { "제휴 정보 없음" }, + enableSeeMore = true, + modifier = Modifier.padding(top = 12.dp) + ) } Text( From 3f5bd7877079b954d11c7444575a1880dde4ca3e Mon Sep 17 00:00:00 2001 From: TaejungKim <92737123+imtaejugkim@users.noreply.github.com> Date: Sun, 19 Apr 2026 21:57:05 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[fix/#81]=20iOS=20=ED=8F=89=EA=B0=80?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=97=85?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EC=95=88=EB=90=98=EB=8A=94=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - bytearray 크기 명시 함수를 통해 NSULRSESSION 크기 먼저 확인하도록 수정 --- .../kotlin/com/kus/kustaurant/evaluate/api/EvaluateApi.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shared/data/evaluate/src/commonMain/kotlin/com/kus/kustaurant/evaluate/api/EvaluateApi.kt b/shared/data/evaluate/src/commonMain/kotlin/com/kus/kustaurant/evaluate/api/EvaluateApi.kt index a9a9f9cb..f9ced1be 100644 --- a/shared/data/evaluate/src/commonMain/kotlin/com/kus/kustaurant/evaluate/api/EvaluateApi.kt +++ b/shared/data/evaluate/src/commonMain/kotlin/com/kus/kustaurant/evaluate/api/EvaluateApi.kt @@ -4,6 +4,7 @@ import com.kus.kustaurant.evaluate.remote.request.EvaluationRequest import com.kus.kustaurant.evaluate.remote.response.EvaluationResponse import io.ktor.client.HttpClient import io.ktor.client.call.body +import io.ktor.client.request.forms.InputProvider import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.forms.formData import io.ktor.client.request.get @@ -11,6 +12,7 @@ import io.ktor.client.request.post import io.ktor.client.request.setBody import io.ktor.http.Headers import io.ktor.http.HttpHeaders +import io.ktor.utils.io.core.ByteReadPacket class EvaluateApi( private val client: HttpClient, @@ -38,13 +40,13 @@ class EvaluateApi( append("evaluationComment", it) } - imageBytes?.let { + imageBytes?.let { bytes -> append( key = "newImage", - value = it, + value = InputProvider(bytes.size.toLong()) { ByteReadPacket(bytes) }, headers = Headers.build { append(HttpHeaders.ContentType, "image/jpeg") - append(HttpHeaders.ContentDisposition, "filename=evaluation.jpg") + append(HttpHeaders.ContentDisposition, "filename=\"evaluation.jpg\"") } ) }