generated from DO-SOPT-ANDROID/do-sopt-android-repo-template
-
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.
Merge pull request #11 from DO-SOPT-ANDROID/feat/#10_week7_basic
[Feat/#10] 7주차 필수과제
- Loading branch information
Showing
8 changed files
with
110 additions
and
49 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
7 changes: 3 additions & 4 deletions
7
app/src/main/java/org/sopt/dosopttemplate/network/login/AuthService.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,17 @@ | ||
package org.sopt.dosopttemplate.network.login | ||
|
||
import retrofit2.Call | ||
import retrofit2.Response | ||
import retrofit2.http.Body | ||
import retrofit2.http.POST | ||
|
||
interface AuthService { | ||
@POST("api/v1/members/sign-in") | ||
suspend fun login( | ||
suspend fun postLogin( | ||
@Body request: RequestLoginDto, | ||
): Response<ResponseLoginDto> | ||
|
||
@POST("api/v1/members") | ||
fun signUp( | ||
suspend fun postSignUp( | ||
@Body request: RequestSignUpDto, | ||
): Call<Unit> | ||
): Response<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
9 changes: 9 additions & 0 deletions
9
app/src/main/java/org/sopt/dosopttemplate/ui/login/LoginState.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,9 @@ | ||
package org.sopt.dosopttemplate.ui.login | ||
|
||
import org.sopt.dosopttemplate.network.login.ResponseLoginDto | ||
|
||
sealed class LoginState { | ||
object Loading : LoginState() | ||
data class Success(val data: ResponseLoginDto) : LoginState() | ||
object Error : LoginState() | ||
} |
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
app/src/main/java/org/sopt/dosopttemplate/ui/login/SignUpState.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 org.sopt.dosopttemplate.ui.login | ||
|
||
sealed class SignUpState { | ||
object Loading : SignUpState() | ||
object Success : SignUpState() | ||
object Error : SignUpState() | ||
} |
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