Skip to content

Commit

Permalink
MONEYMONG-511 feature: 버전 업데이트 체크 API 반환값 변경(String -> Unit) 성공, 실패로 …
Browse files Browse the repository at this point in the history
…나뉘어서 무의미
  • Loading branch information
jhg3410 committed Oct 22, 2024
1 parent 5b22f18 commit 964c26e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ interface VersionApi {
@POST("api/v1/version")
suspend fun checkUpdate(
@Body version: VersionRequest
): Result<String>
): Result<Unit>
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package com.moneymong.moneymong.data.datasource.version

interface VersionRemoteDataSource {

suspend fun checkUpdate(version: String): Result<String>
suspend fun checkUpdate(version: String): Result<Unit>
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import javax.inject.Inject
class VersionRemoteDataSourceImpl @Inject constructor(
private val versionApi: VersionApi
) : VersionRemoteDataSource {
override suspend fun checkUpdate(version: String): Result<String> {
override suspend fun checkUpdate(version: String): Result<Unit> {
return versionApi.checkUpdate(VersionRequest(version = version))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class VersionRepositoryImpl @Inject constructor(
private val versionRemoteDataSource: VersionRemoteDataSource
) : VersionRepository {

override suspend fun checkUpdate(version: String): Result<String> {
override suspend fun checkUpdate(version: String): Result<Unit> {
return versionRemoteDataSource.checkUpdate(version = version)
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.moneymong.moneymong.domain.repository.version

interface VersionRepository {
suspend fun checkUpdate(version: String): Result<String>
suspend fun checkUpdate(version: String): Result<Unit>
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CheckVersionUpdateUseCase @Inject constructor(
private val versionRepository: VersionRepository
) {

suspend operator fun invoke(version: String): Result<String> {
suspend operator fun invoke(version: String): Result<Unit> {
return versionRepository.checkUpdate(version = version)
}
}

0 comments on commit 964c26e

Please sign in to comment.