-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT/#106] λ‘κ·Έμμ / μλ²ν΅μ ꡬν
- Loading branch information
Showing
14 changed files
with
147 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
data/src/main/java/com/terning/data/datasource/MyPageDataSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.terning.data.datasource | ||
|
||
import com.terning.data.dto.NonDataBaseResponse | ||
|
||
interface MyPageDataSource { | ||
suspend fun postLogout(): NonDataBaseResponse | ||
} |
12 changes: 12 additions & 0 deletions
12
data/src/main/java/com/terning/data/datasourceimpl/MyPageDataSourceImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.terning.data.datasourceimpl | ||
|
||
import com.terning.data.datasource.MyPageDataSource | ||
import com.terning.data.dto.NonDataBaseResponse | ||
import com.terning.data.service.MyPageService | ||
import javax.inject.Inject | ||
|
||
class MyPageDataSourceImpl @Inject constructor( | ||
private val myPageService: MyPageService | ||
) : MyPageDataSource { | ||
override suspend fun postLogout(): NonDataBaseResponse = myPageService.postLogout() | ||
} |
14 changes: 14 additions & 0 deletions
14
data/src/main/java/com/terning/data/repositoryimpl/MyPageRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.terning.data.repositoryimpl | ||
|
||
import com.terning.data.datasource.MyPageDataSource | ||
import com.terning.domain.repository.MyPageRepository | ||
import javax.inject.Inject | ||
|
||
class MyPageRepositoryImpl @Inject constructor( | ||
private val myPageDataSource: MyPageDataSource | ||
) : MyPageRepository { | ||
override suspend fun postLogout(): Result<Unit> = | ||
runCatching { | ||
myPageDataSource.postLogout() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.terning.data.service | ||
|
||
import com.terning.data.dto.NonDataBaseResponse | ||
import retrofit2.http.POST | ||
|
||
interface MyPageService { | ||
@POST("api/v1/auth/logout") | ||
suspend fun postLogout(): NonDataBaseResponse | ||
} |
5 changes: 5 additions & 0 deletions
5
domain/src/main/java/com/terning/domain/repository/MyPageRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.terning.domain.repository | ||
|
||
interface MyPageRepository { | ||
suspend fun postLogout() : Result<Unit> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
feature/src/main/java/com/terning/feature/mypage/MyPageState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.terning.feature.mypage | ||
|
||
import com.terning.core.state.UiState | ||
|
||
data class MyPageState( | ||
val isSuccess: UiState<Boolean> = UiState.Loading | ||
) |
53 changes: 51 additions & 2 deletions
53
feature/src/main/java/com/terning/feature/mypage/MyPageViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters