Skip to content

Commit

Permalink
[feat] : #8 BaseResponse -> NullableBaseResponse로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
1971123-seongmin committed Nov 6, 2024
1 parent 193b5f1 commit be65c71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.sopt.and.data.remote.source

import org.sopt.and.base.BaseResponse
import org.sopt.and.base.NullableBaseResponse
import org.sopt.and.data.model.request.UserRegisterRequestDto
import org.sopt.and.data.model.response.UserRegisterResponse

interface UserDataSource {
suspend fun registerUser(userRegisterRequestDto: UserRegisterRequestDto): BaseResponse<UserRegisterResponse>
suspend fun registerUser(userRegisterRequestDto: UserRegisterRequestDto): NullableBaseResponse<UserRegisterResponse>
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.sopt.and.data.remote.source

import org.sopt.and.base.BaseResponse
import org.sopt.and.base.NullableBaseResponse
import org.sopt.and.data.model.request.UserRegisterRequestDto
import org.sopt.and.data.model.response.UserRegisterResponse
import org.sopt.and.data.service.UserApi
Expand All @@ -10,6 +10,6 @@ class UserDataSourceImpl @Inject constructor(
private val userApi: UserApi
) : UserDataSource {
override suspend fun registerUser(
userRegisterRequestDto: UserRegisterRequestDto): BaseResponse<UserRegisterResponse> =
userRegisterRequestDto: UserRegisterRequestDto): NullableBaseResponse<UserRegisterResponse> =
userApi.registerUser(userRegisterRequestDto)
}
4 changes: 2 additions & 2 deletions app/src/main/java/org/sopt/and/data/service/UserApi.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.sopt.and.data.service

import org.sopt.and.base.BaseResponse
import org.sopt.and.base.NullableBaseResponse
import org.sopt.and.data.model.request.UserRegisterRequestDto
import org.sopt.and.data.model.response.UserRegisterResponse
import retrofit2.http.Body
Expand All @@ -13,7 +13,7 @@ interface UserApi {
@POST("/user")
suspend fun registerUser(
@Body body: UserRegisterRequestDto
) : BaseResponse<UserRegisterResponse>
) : NullableBaseResponse<UserRegisterResponse>

@POST("/login")
suspend fun login(
Expand Down

0 comments on commit be65c71

Please sign in to comment.