-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[리팩토링] 과제 리팩토링 - 아키텍처 + 힐트 적용 #19
base: develop-compose
Are you sure you want to change the base?
Changes from all commits
cc27c85
60827e8
b8eb673
259d528
dee6ee5
1ea84e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.sopt.now.compose | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class NowSoptApplication: Application() { | ||
override fun onCreate() { | ||
super.onCreate() | ||
} | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.sopt.now.compose.data.datasource | ||
|
||
import com.sopt.now.compose.data.model.request.RequestLoginDto | ||
import com.sopt.now.compose.data.model.request.RequestSignupDto | ||
import com.sopt.now.compose.data.model.response.ResponseUserInfoDto | ||
import com.sopt.now.compose.util.BaseResponse | ||
|
||
interface AuthRemoteDataSource { | ||
suspend fun signup(requestSignupDto: RequestSignupDto): BaseResponse<Unit> | ||
|
||
suspend fun login(requestLoginDto: RequestLoginDto): String? | ||
|
||
suspend fun getUserInfo(memberId: String): BaseResponse<ResponseUserInfoDto> | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.sopt.now.compose.data.datasource | ||
|
||
import com.sopt.now.compose.data.model.response.ResponseFriendsDto | ||
|
||
interface FriendRemoteDataSource { | ||
suspend fun getFriendsList(page: Int): ResponseFriendsDto | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.sopt.now.compose.data.datasourceImpl | ||
|
||
import com.sopt.now.compose.data.ServicePool | ||
import com.sopt.now.compose.data.datasource.AuthRemoteDataSource | ||
import com.sopt.now.compose.data.model.request.RequestLoginDto | ||
import com.sopt.now.compose.data.model.request.RequestSignupDto | ||
import com.sopt.now.compose.data.model.response.ResponseUserInfoDto | ||
import com.sopt.now.compose.util.BaseResponse | ||
|
||
class AuthRemoteDatasourceImpl : AuthRemoteDataSource { | ||
private val authService = ServicePool.authService | ||
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 시간 된다면 여기도 힐트 넣어주면 좋을 것 같아요!! |
||
|
||
override suspend fun signup(requestSignupDto: RequestSignupDto): BaseResponse<Unit> = | ||
authService.signup(requestSignupDto) | ||
|
||
override suspend fun login(requestLoginDto: RequestLoginDto): String? = | ||
authService.login(requestLoginDto).headers()[LOCATION] | ||
|
||
override suspend fun getUserInfo(memberId: String): BaseResponse<ResponseUserInfoDto> = | ||
authService.getUserInfo(memberId = memberId) | ||
|
||
companion object { | ||
const val LOCATION = "location" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.sopt.now.compose.data.datasourceImpl | ||
|
||
import com.sopt.now.compose.data.datasource.FriendRemoteDataSource | ||
import com.sopt.now.compose.data.model.response.ResponseFriendsDto | ||
import com.sopt.now.compose.data.service.FriendService | ||
import javax.inject.Inject | ||
|
||
class FriendRemoteDatasourceImpl @Inject constructor( | ||
private val friendService: FriendService | ||
) : FriendRemoteDataSource { | ||
override suspend fun getFriendsList(page: Int): ResponseFriendsDto = | ||
friendService.getFriendsList(page = page) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 BaseResponse까지!! 좋네용