Skip to content

Commit

Permalink
[feat/#76] 로그인/로그아웃/회원가입 api 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnseo committed Feb 6, 2024
1 parent 6c51aa1 commit 19a3390
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
24 changes: 9 additions & 15 deletions data/src/main/java/com/kusitms/data/remote/api/KusitmsApi.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.kusitms.data.remote.api

import com.kusitms.data.remote.entity.BaseResponse
import com.kusitms.data.remote.entity.request.CommentContentRequestBody
import com.kusitms.data.remote.entity.request.ReportCommentRequestBody
import com.kusitms.data.remote.entity.request.UpdatePasswordRequest
import com.kusitms.data.remote.entity.request.*
import com.kusitms.data.remote.entity.response.CheckPasswordPayload
import com.kusitms.data.remote.entity.response.FindPwCheckEmailResponse
import com.kusitms.data.remote.entity.response.LoginMemberProfileResponse
Expand All @@ -26,8 +24,7 @@ import retrofit2.http.*
interface KusitmsApi {
@GET("v1/auth/login/MEMBER")
suspend fun loginMember(
@Query("email") email: String,
@Query("password") password: String,
@Body loginRequestBody: LoginRequestBody
): LoginResponse

@Multipart
Expand Down Expand Up @@ -136,35 +133,32 @@ interface KusitmsApi {
@FormUrlEncoded
@GET("v1/member/check/register")
suspend fun signInRequestCheck(
@Field("email") email: String,
@Field("password") password: String,
@Body loginRequestBody: LoginRequestBody
): SignInRequestResponse

@FormUrlEncoded
@GET("v1/member/register")
suspend fun signInRequest(
@Field("email") email: String,
@Field("password") password: String,
@Body loginRequestBody: LoginRequestBody
): BaseResponse<Unit>

// FindPw
@FormUrlEncoded
@GET("v1/member/email")
suspend fun verifyEmailCheck(
@Field("email") email: String,
@Body checkEmailRequestBody: CheckEmailRequestBody
): FindPwCheckEmailResponse

@FormUrlEncoded
@POST("v1/member/verify")
suspend fun sendCode(
@Field("email") email: String,
@Body checkEmailRequestBody: CheckEmailRequestBody
): BaseResponse<Unit>

@FormUrlEncoded
@POST("v1/member/verify/code")
suspend fun verifyCode(
@Field("email") email: String,
@Field("code") code: String,
@Body emailVerifyRequestBody: EmailVerifyRequestBody
): FindPwCodeVerifyResponse

@PUT("v1/member/password/unauthenticated")
Expand All @@ -174,9 +168,9 @@ interface KusitmsApi {
): BaseResponse<Unit>


@POST("v1/member/password")
@GET("v1/member/password")
suspend fun checkPassword(
@Query("password") password: String,
@Body passwordRequestBody: passwordRequestBody
): BaseResponse<CheckPasswordPayload>

@PUT("v1/member/password")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.kusitms.data.remote.entity.request

data class LoginRequestBody(
val email: String,
val password: String
)

data class CheckEmailRequestBody(
val email: String
)

data class EmailVerifyRequestBody(
val email: String,
val code : String
)

data class passwordRequestBody(
val password: String
)

0 comments on commit 19a3390

Please sign in to comment.