-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/Team-Going/Going-Android …
…into feat/#75-todo-detail-api
- Loading branch information
Showing
39 changed files
with
306 additions
and
148 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
5 changes: 2 additions & 3 deletions
5
data/src/main/java/com/going/data/datasource/SettingDataSource.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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
package com.going.data.datasource | ||
|
||
import com.going.data.dto.NonDataBaseResponse | ||
import com.going.data.dto.response.SignOutResponseDto | ||
|
||
interface SettingDataSource { | ||
suspend fun patchSignOut(): SignOutResponseDto | ||
suspend fun patchSignOut(): NonDataBaseResponse | ||
|
||
suspend fun deleteWithDraw(): NonDataBaseResponse<Unit> | ||
suspend fun deleteWithDraw(): NonDataBaseResponse | ||
} |
8 changes: 8 additions & 0 deletions
8
data/src/main/java/com/going/data/datasource/TendencyDataSource.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,8 @@ | ||
package com.going.data.datasource | ||
|
||
import com.going.data.dto.NonDataBaseResponse | ||
import com.going.data.dto.request.TendencyTestRequestDto | ||
|
||
interface TendencyDataSource { | ||
suspend fun patchTendencyTest(result: TendencyTestRequestDto): NonDataBaseResponse | ||
} |
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
14 changes: 14 additions & 0 deletions
14
data/src/main/java/com/going/data/datasourceImpl/TendencyDataSourceImpl.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.going.data.datasourceImpl | ||
|
||
import com.going.data.datasource.TendencyDataSource | ||
import com.going.data.dto.NonDataBaseResponse | ||
import com.going.data.dto.request.TendencyTestRequestDto | ||
import com.going.data.service.TendencyService | ||
import javax.inject.Inject | ||
|
||
class TendencyDataSourceImpl @Inject constructor( | ||
private val tendencyService: TendencyService, | ||
) : TendencyDataSource { | ||
override suspend fun patchTendencyTest(result: TendencyTestRequestDto): NonDataBaseResponse = | ||
tendencyService.patchTendencyTest(result) | ||
} |
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
13 changes: 13 additions & 0 deletions
13
data/src/main/java/com/going/data/dto/request/TendencyRequestDto.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,13 @@ | ||
package com.going.data.dto.request | ||
|
||
import com.going.domain.entity.request.TendencyRequestModel | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class TendencyTestRequestDto( | ||
@SerialName("result") | ||
val result: List<Int>, | ||
) | ||
|
||
fun TendencyRequestModel.toTendencyTestRequestDto() = TendencyTestRequestDto(result) |
16 changes: 0 additions & 16 deletions
16
data/src/main/java/com/going/data/dto/response/SignOutResponseDto.kt
This file was deleted.
Oops, something went wrong.
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
5 changes: 2 additions & 3 deletions
5
data/src/main/java/com/going/data/repositoryImpl/SettingRepositoryImpl.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
16 changes: 16 additions & 0 deletions
16
data/src/main/java/com/going/data/repositoryImpl/TendencyRepositoryImpl.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,16 @@ | ||
package com.going.data.repositoryImpl | ||
|
||
import com.going.data.datasource.TendencyDataSource | ||
import com.going.data.dto.request.toTendencyTestRequestDto | ||
import com.going.domain.entity.request.TendencyRequestModel | ||
import com.going.domain.repository.TendencyRepository | ||
import javax.inject.Inject | ||
|
||
class TendencyRepositoryImpl @Inject constructor( | ||
private val tendencyDataSource: TendencyDataSource, | ||
) : TendencyRepository { | ||
override suspend fun patchTendencyTest(result: TendencyRequestModel): Result<Unit> = | ||
runCatching { | ||
tendencyDataSource.patchTendencyTest(result.toTendencyTestRequestDto()) | ||
} | ||
} |
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
package com.going.data.service | ||
|
||
import com.going.data.dto.NonDataBaseResponse | ||
import com.going.data.dto.response.SignOutResponseDto | ||
import retrofit2.http.DELETE | ||
import retrofit2.http.PATCH | ||
|
||
interface SettingService { | ||
@PATCH("api/users/signout") | ||
suspend fun patchSignOut(): SignOutResponseDto | ||
suspend fun patchSignOut(): NonDataBaseResponse | ||
|
||
@DELETE("api/users/withdraw") | ||
suspend fun deleteWithDraw(): NonDataBaseResponse<Unit> | ||
suspend fun deleteWithDraw(): NonDataBaseResponse | ||
} |
13 changes: 13 additions & 0 deletions
13
data/src/main/java/com/going/data/service/TendencyService.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,13 @@ | ||
package com.going.data.service | ||
|
||
import com.going.data.dto.NonDataBaseResponse | ||
import com.going.data.dto.request.TendencyTestRequestDto | ||
import retrofit2.http.Body | ||
import retrofit2.http.PATCH | ||
|
||
interface TendencyService { | ||
@PATCH("api/users/test") | ||
suspend fun patchTendencyTest( | ||
@Body result: TendencyTestRequestDto, | ||
): NonDataBaseResponse | ||
} |
2 changes: 1 addition & 1 deletion
2
...main/entity/request/RequestSignInModel.kt → ...main/entity/request/SignInRequestModel.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.going.domain.entity.request | ||
|
||
data class RequestSignInModel( | ||
data class SignInRequestModel( | ||
val platform: String | ||
) |
2 changes: 1 addition & 1 deletion
2
...main/entity/request/RequestSignUpModel.kt → ...main/entity/request/SignUpRequestModel.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
5 changes: 5 additions & 0 deletions
5
domain/src/main/kotlin/com/going/domain/entity/request/TendencyRequestModel.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.going.domain.entity.request | ||
|
||
data class TendencyRequestModel( | ||
val result: List<Int> | ||
) |
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ data class OngoingListModel( | |
val startDate: String, | ||
val endDate: String, | ||
val day: Int | ||
) | ||
) |
6 changes: 0 additions & 6 deletions
6
domain/src/main/kotlin/com/going/domain/entity/response/SignOutModel.kt
This file was deleted.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
domain/src/main/kotlin/com/going/domain/repository/AuthRepository.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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
package com.going.domain.repository | ||
|
||
import com.going.domain.entity.request.RequestSignInModel | ||
import com.going.domain.entity.request.RequestSignUpModel | ||
import com.going.domain.entity.request.SignInRequestModel | ||
import com.going.domain.entity.request.SignUpRequestModel | ||
import com.going.domain.entity.response.AuthTokenModel | ||
import com.going.domain.entity.response.SignInModel | ||
|
||
interface AuthRepository { | ||
suspend fun postSignIn( | ||
Authorization: String, | ||
data: RequestSignInModel, | ||
data: SignInRequestModel, | ||
): Result<SignInModel> | ||
|
||
suspend fun postSignUp( | ||
Authorization: String, | ||
data: RequestSignUpModel, | ||
data: SignUpRequestModel, | ||
): Result<AuthTokenModel> | ||
} |
4 changes: 1 addition & 3 deletions
4
domain/src/main/kotlin/com/going/domain/repository/SettingRepository.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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
package com.going.domain.repository | ||
|
||
import com.going.domain.entity.response.SignOutModel | ||
|
||
interface SettingRepository { | ||
suspend fun patchSignOut(): Result<SignOutModel> | ||
suspend fun patchSignOut(): Result<Unit> | ||
|
||
suspend fun deleteWithDraw(): Result<Unit> | ||
} |
7 changes: 7 additions & 0 deletions
7
domain/src/main/kotlin/com/going/domain/repository/TendencyRepository.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.going.domain.repository | ||
|
||
import com.going.domain.entity.request.TendencyRequestModel | ||
|
||
interface TendencyRepository { | ||
suspend fun patchTendencyTest(result: TendencyRequestModel): 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
Oops, something went wrong.