From 05ba3d01e5b61bf9c351399ee79630440ec1a544 Mon Sep 17 00:00:00 2001 From: easyhz Date: Sat, 31 Aug 2024 11:02:47 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=94=84=EB=A1=9C=EB=AA=A8=EC=85=98=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EA=B2=80=EC=A6=9D=20request=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#187)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../noffice/core/network/api/promotion/PromotionService.kt | 3 ++- .../core/network/model/request/promotion/PromotionRequest.kt | 5 +++++ .../repository/promotion/PromotionRepositoryImpl.kt | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 core/network/src/main/java/com/easyhz/noffice/core/network/model/request/promotion/PromotionRequest.kt diff --git a/core/network/src/main/java/com/easyhz/noffice/core/network/api/promotion/PromotionService.kt b/core/network/src/main/java/com/easyhz/noffice/core/network/api/promotion/PromotionService.kt index 8fb9744c..7ea80e46 100644 --- a/core/network/src/main/java/com/easyhz/noffice/core/network/api/promotion/PromotionService.kt +++ b/core/network/src/main/java/com/easyhz/noffice/core/network/api/promotion/PromotionService.kt @@ -1,5 +1,6 @@ package com.easyhz.noffice.core.network.api.promotion +import com.easyhz.noffice.core.network.model.request.promotion.PromotionRequest import com.easyhz.noffice.core.network.util.NofficeResult import retrofit2.http.GET import retrofit2.http.Query @@ -8,6 +9,6 @@ interface PromotionService { /* 프로모션 코드 검증 */ @GET("/api/v1/promotion/verify") suspend fun verifyPromotion( - @Query("promotionCode") promotionCode: String + @Query("promotionCode") promotionCode: PromotionRequest ): NofficeResult } \ No newline at end of file diff --git a/core/network/src/main/java/com/easyhz/noffice/core/network/model/request/promotion/PromotionRequest.kt b/core/network/src/main/java/com/easyhz/noffice/core/network/model/request/promotion/PromotionRequest.kt new file mode 100644 index 00000000..7a59128c --- /dev/null +++ b/core/network/src/main/java/com/easyhz/noffice/core/network/model/request/promotion/PromotionRequest.kt @@ -0,0 +1,5 @@ +package com.easyhz.noffice.core.network.model.request.promotion + +data class PromotionRequest( + val code: String +) diff --git a/data/organization/src/main/java/com/easyhz/noffice/data/organization/repository/promotion/PromotionRepositoryImpl.kt b/data/organization/src/main/java/com/easyhz/noffice/data/organization/repository/promotion/PromotionRepositoryImpl.kt index e9b88dde..14082355 100644 --- a/data/organization/src/main/java/com/easyhz/noffice/data/organization/repository/promotion/PromotionRepositoryImpl.kt +++ b/data/organization/src/main/java/com/easyhz/noffice/data/organization/repository/promotion/PromotionRepositoryImpl.kt @@ -3,6 +3,7 @@ package com.easyhz.noffice.data.organization.repository.promotion import com.easyhz.noffice.core.common.di.Dispatcher import com.easyhz.noffice.core.common.di.NofficeDispatchers import com.easyhz.noffice.core.network.api.promotion.PromotionService +import com.easyhz.noffice.core.network.model.request.promotion.PromotionRequest import com.easyhz.noffice.core.network.util.toResult import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.withContext @@ -14,6 +15,6 @@ class PromotionRepositoryImpl @Inject constructor( ) : PromotionRepository { override suspend fun verifyPromotion(promotionCode: String): Result = withContext(dispatcher) { - promotionService.verifyPromotion(promotionCode).toResult() + promotionService.verifyPromotion(PromotionRequest(promotionCode)).toResult() } } \ No newline at end of file