From 19a33908182b5517729ca1460ebe6191c856ec87 Mon Sep 17 00:00:00 2001 From: MinseoShindor Date: Tue, 6 Feb 2024 21:49:46 +0900 Subject: [PATCH] =?UTF-8?q?[feat/#76]=20=EB=A1=9C=EA=B7=B8=EC=9D=B8/?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=95=84=EC=9B=83/=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EA=B0=80=EC=9E=85=20api=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kusitms/data/remote/api/KusitmsApi.kt | 24 +++++++------------ .../remote/entity/request/LoginRequestBody.kt | 19 +++++++++++++++ 2 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 data/src/main/java/com/kusitms/data/remote/entity/request/LoginRequestBody.kt diff --git a/data/src/main/java/com/kusitms/data/remote/api/KusitmsApi.kt b/data/src/main/java/com/kusitms/data/remote/api/KusitmsApi.kt index df5ab43f..f63ea4ec 100644 --- a/data/src/main/java/com/kusitms/data/remote/api/KusitmsApi.kt +++ b/data/src/main/java/com/kusitms/data/remote/api/KusitmsApi.kt @@ -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 @@ -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 @@ -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 // 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 @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") @@ -174,9 +168,9 @@ interface KusitmsApi { ): BaseResponse - @POST("v1/member/password") + @GET("v1/member/password") suspend fun checkPassword( - @Query("password") password: String, + @Body passwordRequestBody: passwordRequestBody ): BaseResponse @PUT("v1/member/password") diff --git a/data/src/main/java/com/kusitms/data/remote/entity/request/LoginRequestBody.kt b/data/src/main/java/com/kusitms/data/remote/entity/request/LoginRequestBody.kt new file mode 100644 index 00000000..c822258e --- /dev/null +++ b/data/src/main/java/com/kusitms/data/remote/entity/request/LoginRequestBody.kt @@ -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 +) \ No newline at end of file