-
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.
* #31 회원가입 요청 코드 작성(초안) * #31 회원가입, 로그인, 로그아웃, 자동 로그인 코드 작성 Co-authored-by: unknown <[email protected]>
- Loading branch information
1 parent
1f7f4ad
commit 40ec89c
Showing
13 changed files
with
233 additions
and
87 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
34 changes: 34 additions & 0 deletions
34
SHAPEUP2022/app/src/main/java/com/example/shape_up_2022/NetworkService.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,34 @@ | ||
package com.example.shape_up_2022 | ||
|
||
import retrofit2.Call | ||
import retrofit2.http.* | ||
|
||
interface NetworkService { | ||
@POST("api/users/register") | ||
fun register( | ||
@Body user: RegisterReq, | ||
): Call<RegisterRes> | ||
|
||
@POST("api/users/login") | ||
fun login( | ||
@Body user: LoginReq, | ||
): Call<LoginRes> | ||
|
||
@GET("api/users/logout") | ||
fun logout( | ||
|
||
): Call<LogoutRes> | ||
|
||
} | ||
|
||
data class RegisterReq(val name: String, val email: String, val password: String) | ||
|
||
data class RegisterRes(val success: String) | ||
|
||
data class LoginReq(val email: String, val password: String) | ||
|
||
data class LoginRes(val loginSuccess: String, val message: String) | ||
|
||
data class LogoutReq(val email: String) | ||
|
||
data class LogoutRes(val success: String, val err: String) |
Oops, something went wrong.