-
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
Week4 essential #9
base: develop
Are you sure you want to change the base?
Conversation
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.
๋คํธ์ํฌ ์ฐ๊ฒฐํ๋ ์์ , DI๋ก ์์กด์ฑ์ ์ ๋ฌํ๋ ๊ณผ์ ์์ ํ์ตํ ๊ฒ์ด ๋ง์ผ์ จ์ ํ ๋ฐ ๊ณ ์ํ์ จ์ต๋๋ค ์ฑ๋ฏผ๋
class GlobalApplication: Application() { | ||
private lateinit var dataStore: InfoDataStore | ||
private lateinit var dataStore: TokenManager |
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.
dataStore๋ ๋ฒ์ฉ์ ์ธ ์ด๋ฆ์ด์ง๋ง, ์ค์ ํ์ ์ token์ ๊ด๋ฆฌํ๋ TokenManager๋ก ๋น๊ต์ ๊ตฌ์ฒด์ ํ์ ์ด๋ค์. tokenManager๋ก ๊ฐ๋๊ฑด ์ด๋จ๊น ์ถ์ต๋๋ค.
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.
TokenManager๊ฐ ๋ ์ ์ ํ ์ด๋ฆ์ด๋ค์. ๊ฐ์ฌํฉ๋๋ค
@Provides | ||
@Singleton | ||
@Token | ||
fun provideTokenInterceptor(tokenManager: TokenManager): AccessTokenInterceptor { | ||
return AccessTokenInterceptor(tokenManager) | ||
} | ||
|
||
@Provides | ||
@Singleton | ||
fun provideOKHttpClient( | ||
httpLoggingInterceptor: HttpLoggingInterceptor, | ||
accessTokenInterceptor: AccessTokenInterceptor | ||
): OkHttpClient = |
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.
token qualifier ์ง์ ์ด ๋ฌด์๋ฏธ ํ ์ํฉ ๊ฐ์ต๋๋ค.
์ค์ ๋ก ์ง๊ธ๋ AccessTokenInterceptor ๊ฐ์ฒด๋ ๋ฑ ํ๋๋ง ์ ๊ณตํ๊ณ ์์ผ๋ฏ๋ก, Token qualifier ์์ด ์ ์์กด์ฑ์ด ๋ค์ด๊ฐ๊ณ ์๋ ๊ฑธ ๋ณผ ์ ์๋ค์.
connectTimeout(30, TimeUnit.SECONDS) | ||
readTimeout(30, TimeUnit.SECONDS) | ||
writeTimeout(30, TimeUnit.SECONDS) | ||
addInterceptor(httpLoggingInterceptor) |
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.
์ค์ ๋ฆด๋ฆฌ์ฆ ์ฝ๋์ ํฌํจ๋ ์ด์ ๋ ์์ผ๋ฏ๋ก ๋๋ฒ๊ทธ ๋น๋์๋ง ์ถ๊ฐํ๋๋ก ์ง์ ํจ์ ์ด๋จ์ง์?
addInterceptor(httpLoggingInterceptor) | |
if (BuildConfig.DEBUG) addInterceptor(httpLoggingInterceptor) |
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.
๋๋ฒ๊ทธ ๋น๋์ ๋ฐ๋ก ์ง์ ๊ฐ๋ฅํ์ง ๋ชฐ๋๋๋ฐ ๊ฐ์ฌํฉ๋๋ค.
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.
์ฑ๋ฏผ์จ ์ ์ ๋ฐ๋ผ์ก๊ธฐ ์ด๋ ค์์ง๋ค์ ใ
๊ทธ๋ฅ ๊ณผ์ ๋ง ํ๊ฒ ์๋๋ผ mvi ์ ์ฉ๋ ํ๊ณ ๋
ธ๋ ฅํ์ ๊ฒ ๋ณด์ด๋ค์..
๊ทผ๋ฐ ์ค๊ฐ์ ์ค ๊ณต๋ฐฑ ๋ถํธํ๊ฑฐ ์ข ์์ด์ ์ง์, ํ์ํํ
ํผ๋์ค๋ฏํ๋ค์ ใ
|
||
@Serializable | ||
data class BaseResponse<T>( | ||
@SerialName("code") |
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.
์ด์งํผ ๋ณ์๋ช ๊ณผ json์ ๋ณ์๋ช ์ด ๊ฐ์๋ฐ SerialName ์ด๋ ธํ ์ด์ ์ผ๋ก ๋ช ์ํ๋๊ฒ ๋์ ๊ฒ์ธ๊ฐ์?
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.
๋ณ์๋ช ์ด ๋์ผํ๋ฉด ์๋ตํด๋ ๋๊ธดํ๋ฐ ์ ๋ ๋๊ฐ์๋ ์ต๊ด์ ์ผ๋ก ์ฐ๋ ํธ์ด์์.
@@ -0,0 +1,63 @@ | |||
package org.sopt.and.base |
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.
ํน์ base๋ผ๋ ํจํค์ง๋ ์ด๋ค๊ฒ์ ์๋ฏธํ๋์?
mvi๋ฅผ ์ ์ฉํ์๋ฉด์ ์๊ฒจ๋ ๊ฒ์ธ๊ฐ์?
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.
base ํจํค์ง๋ ์ ๊ฐ ์ฃผ๋ก BaseViewModel, BaseResponse / BaseActivity, BaseFragment, BaseAdapter (์ด ์ธ๊ฐ๋ xml์์) ๋ฑ base๋ก ์์๋ฐ์ ์ฌ์ฉํ๋ ๊ธฐ๋ฐ ํด๋์ค๋ค์ ๋ชจ์๋ ๋ ์ฐ๊ณ ์์ด์
|
||
@Qualifier | ||
@Retention(AnnotationRetention.BINARY) | ||
annotation class MainServer |
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.
์ ๊ธฐํ ๋ฌธ๋ฒ.. ์ด๋ค ์๋์ธ์ง๋ ์ฌ์ฌ ๋ชจ๋ฅด๊ฒ ๋ค์..
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.
์์กด์ฑ ์ฃผ์
์ ์ฌ์ฉํ๋ค ๋ณด๋ฉด ๊ตฌํ์ฒด๋ค์ด ์ฌ๋ฌ๊ฐ ์๊ธฐ๋๋ฐ ์ด๊ฒ๋ค์ ๊ตฌ๋ถํ๊ธฐ ์ํ ํ๊ทธ, ์ด๋ฆ์ด๋ผ๊ณ ์๊ฐํ์๋ฉด ๋์.
ex) ์คํ๋ง์๋ฒ / ํ์ด์ฌ ์๋ฒ๋ฅผ ๊ตฌ๋ถํ ๋ (์๋ค๋ค ์ธ ๋ ๋ฆฌํฌ์งํ ๋ฆฌ, ๋ฐ์ดํฐ์์ค ๋ฑ ํด๋์ค, ์ธํฐํ์ด์ค ๋ฑ ํ์ผ์ด ๋ค๋ฅผ ํ
๋ฐ ์ด๊ฑธ ๋ฐ๋ก ๋ถ๋ฆฌํ์ง ์๊ณ ์ฌ์ฉํ๋ฉด ๋ณต์กํด์)
} | ||
|
||
companion object { | ||
const val HEADER_AUTHORIZATION = "token" |
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.
์ธ์ฌํ๋ค์..
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class UserLoginResponse( |
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.
์ํ ์ฑ๊ณต์ ๋ํ Response๋ง ๋ค๋ฃฐ DTO๋ฅผ ๋ง๋์๊ณ ์ ๋๋ด ํ์ ์ผ๋ก ์ฃผ์๋ ๊ฒ ๊ฐ์๋ฐ ํ DTO์ ์ฑ๊ณต ์คํจ ๋๋ค ๋ค์ด๊ฐ ์ ์๊ฒ ํ๋ ๊ฑฐ ๋ณด๋ค ์ ์ง๋ณด์์์ ์ฅ์ ์ด ์์ด ์ด๋ ๊ฒ ํ์ ๊ฑด๊ฐ์?
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.
์ง๋ฌธ์ ์ดํด ๋ชปํ๋๋ฐ ์ข ๋ ํ์ด์ ์ค๋ช ํด์ฃผ์ค ์ ์์ผ์ค๊น์? ใ ใ
์๋ฅ, | ||
์ ๋, | ||
ํด์ธ์๋ฆฌ์ฆ | ||
enum class Movie(val description: String) { |
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.
์ค์ค์ค ๊น๋
import org.sopt.and.utils.showToastMsg | ||
|
||
@Composable | ||
fun SignInRoute ( |
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.
๋ผ์ฐํธ(?)๋ฅผ ๋์ ํ์ จ๊ตฐ์
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.
๋ค๋น๊ฒ์ด์ ํ์ผ์์ ์ง์ ์ด๊ฑธ ์ ์ํ๋ฉด ๋๋ฌด ๊ธธ์ด์ง๊ณ ๋ณต์กํด์ ธ์ ๋ถ๋ฆฌํ์ด์.
import org.sopt.and.presentation.utils.UiEvent | ||
import org.sopt.and.presentation.utils.UiState | ||
|
||
class SignInContract { |
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.
์ด๋ฐ์์ผ๋ก ๋ชจ์๋๊ตฐ์!
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.
MVI ์ธ ๋ ์ด๋ฐ์์ผ๋ก ๋ชจ์๋๊ณ ์ฐ๋๋ผ๊ตฌ์.
์ ๋ MVI ๊ณต๋ถํ ๋ https://velog.io/@kkmtk00314/Android-Compose-MVI-%EC%A0%81%EC%9A%A9%ED%95%B4%EB%B3%B4%EA%B8%B0 ์ฌ๊ธฐ๋ ๋ค๋ฅธ ๊นํ๋ธ๊ฐ์ด ์ฐธ๊ณ ํด์ ํ์ด์.
|
||
companion object { | ||
private val Context.infoDataStore: DataStore<Preferences> by preferencesDataStore(name = "info") | ||
private val ACCESS_TOKEN_KEY = stringPreferencesKey("access_token") |
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.
๋ณดํต ์ ์ ์ ํ ํฐ์ผ๋ก ์ฐ์ด๋ฉด access_token์ด๋ผ๊ณ ๋ค์ด๋ฐ์ ํ๋์?
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.
์ ๋ ํ์์ JWT ํ ํฐ ์ฌ์ฉํ ๋ ์ฃผ๋ก ์ฌ์ฉํด์ ๊ทธ๊ฒ ๋๋ฌธ์ ๋ค์ด๋ฐ์ ์ ๋ ๊ฒ ํ ๊ฒ ๊ฐ์์.
import android.content.Context | ||
import android.widget.Toast | ||
|
||
fun Context.showToastMsg(message: String, duration: Int = Toast.LENGTH_SHORT) { |
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.
์ ์ด๋ ๊ฒ ๋ง๋ค๋ฉด context๋ฅผ ์๋ฐ๊ฒ ํ๊ตฐ์
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.
์ด๋๋ง 4์ฃผ์ฐจ๊น์ง ์๋ค์!! ์ ์ฆ์ผ์ด์ค ์ฌ์ฉํ์ ๊ฑฐ ๋ณด๊ณ .. ๊น๋.. ์ ๋ ์๋ ค์ฃผ์ธ์ ์ ์ ์ฆ์ผ์ด์ค ๋ชฐ๋ผ์ ์๋ฒํต์ ์ด ์๊ทผ ๊ณ ๋ คํด์ผํ ๊ฒ ๋ง์๋ฐ ๊ณ ์ํ์ จ์ต๋๋ค : - )
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.
์ฑ๋ฏผ๋๋ ์ ์ฆ์ผ์ด์ค๋ฅผ ์ฌ์ฉํ์ จ๊ตฐ์.. ๋ค๋ค ์ค์ผ ์๋๊ฒ ๋ง์์?
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.
์ธ์ ใ ๋จธ์ ์ค์ผ ์ํ์ธ์
|
||
@GET("/user/{no}/my-hobby") | ||
suspend fun getOthersHobby( | ||
|
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.
๊ณต๋ฐฑ ๋ฐ์..!
setState(currentState.copy(loginStatus = SignInContract.SignInStatus.FAILURE)) | ||
setEffect(SignInContract.Effect.ShowToast("๋ก๊ทธ์ธ ์คํจ: ${exception.message}")) |
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.
์คํจ์ ๊ฒฝ์ฐ๊น์ง ์ธ์ฌํ๊ฒ ์ ๊ฒฝ์จ์ฃผ์ จ๋ค์ ์ข์์ !!
import android.content.Context | ||
import android.widget.Toast | ||
|
||
fun Context.showToastMsg(message: String, duration: Int = Toast.LENGTH_SHORT) { |
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.
ํ์ฅํจ์๊น์ง ๋ ์ข์์! ๊ทธ๋ฆฌ๊ณ ํจ์๋ช
/๋ณ์๋ช
์์ ์ถ์ฝ์ด๋ฅผ ์ฌ์ฉํ๋ ๊ฑด ์ง์ํด๋ณด์์!
๋ฌผ๋ก msg ๋ผ๋ ๋จ์ด๋ ์ฐ๋ฆฌ๊ฐ ํํ๊ฒ ์ฌ์ฉํ๋ฏ๋ก ์ด ์๋ฏธ๋ฅผ ์ ์ถํ ์ ์๊ธด ํ๋, ํ์
์ ํ ๋ ์ถ์ฝ์ด๋ฅผ ์ฌ์ฉํ๊ฒ ๋๋ฉฐ ๊ฐ๋
์ฑ์ด ๋จ์ด์ง ์ ์์ต๋๋ค :)
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.
MVI ์ ์ฉ๊น์ง..ใทใท
๋๋ฌด ๋์์ด์ ๋ ์ด ์งง์ ์๊ฐ์ใ
ใ
!!
์์ด๋ ๊ฒ ์ฐ๋ฆฌ ์ฝ๋ฆฌ์กฐ๊ฐ ์ฒ์ฌ์ผ
dependencies { | ||
dependencies { | ||
|
||
implementation(libs.androidx.core.ktx) |
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.
androidx ๊ณ์ด ์น๊ตฌ๋ค์ bundles๋ก ๋ฌถ์ผ๋ฉด ํ ์ค๋ก ์ด ๋ง์ ์น๊ตฌ๋ค์ ํ๋ฒ์ ์ถ๊ฐํ ์ ์์์! ๋ฒ์ ์นดํ๋ก๊ทธ์ bundles์ ๋ํด ์์๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์์!
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.
๋ชฐ๋๋ ๋ด์ฉ์ธ๋ฐ ๊ณต์ ํด ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค.
|
||
@Provides | ||
@Singleton | ||
fun provideTokenManager(@ApplicationContext context: Context): TokenManager { |
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.
๋ ํฌ์งํ ๋ฆฌ ๋ชจ๋์ ๋ค์ด๊ฐ๋ ๋ด์ฉ์ด๋ฌ๋ฉด ํ ํฐ๋งค๋์ ๋ค์ด๋ฐ์ ๋ณ๊ฒฝํ๋ ๊ฒ๋ ์ข์ ๊ฒ ๊ฐ์์! ์ด๋ค ์ญํ ์ธ์ง ์ง๊ด์ ์ผ๋ก ์๋ฟ์ง ์๋ ๊ฒ ๊ฐ์์ฉ
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.
์๋ ํ ํฐ ๋ชจ๋๋ก ๋ฐ๋ก ์ ์ฅํด๋๋๋ฐ ๋ฆฌํฌ์งํ ๋ฆฌ ๋ชจ๋์ ๋ค์ด๊ฐ์๋ค์.. ๋ค์์ ์์ ํ๊ฒ ์ต๋๋ค
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.
์ธ์ ใ ๋จธ์ ์ค์ผ ์ํ์ธ์
import org.sopt.and.data.service.AuthApi | ||
import javax.inject.Inject | ||
|
||
class AuthDataSourceImpl @Inject constructor( |
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.
@kamja0510 ์ด ๋ถ๋ถ์ MVI๋ณด๋จ ํด๋ฆฐ์ํคํ ์ฒ์ ํํธ์ ๋ํด ๊ณต๋ถํด๋ณด์๋ฉด ์ดํด๋ ๊ฑฐ์์!
override suspend fun getMyHobby(): Result<MyHobbyEntity> = | ||
runCatching { | ||
val response = userDataSource.getMyHobby() | ||
response.result.mapperToMyHobbyEntity() |
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.
์ด ๋ถ๋ถ์ ๊ผญ response ๋ณ์๋ฅผ ๋ง๋ค์ง ์๊ณ ํ์ค๋ก ํด๋ ๊ด์ฐฎ์ ๊ฒ ๊ฐ์์! ํฌ๊ฒ ์ฌ์ฉ๋์ง ์๋ ๋ณ์๋ฅผ ๊ตณ์ด ์ ์ํ ํ์๋ ์์ผ๋๊น์ฉ
|
||
interface AuthApi { | ||
|
||
@POST("/user") |
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.
์ทจํฅ์ ๋ฐ๋ผ uri๋ฅผ ์์ํํ๋ ๊ฒฝ์ฐ๋ ์๋ต๋๋ค!
์ ๋ ์๋๋ ์ฌ์ค ํ๋๋ฐ ์ด๋ฒ์ ๋ชปํ์ด์..
|
||
@PUT("/user") | ||
suspend fun editUserInfo( | ||
|
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.
๊ณต๋ฐฑ ์ก์๋ด๊ธฐ ์
import org.sopt.and.domain.model.auth.UserIdEntity | ||
import org.sopt.and.domain.model.auth.UserTokenEntity | ||
|
||
object AuthMapper { |
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.
๋งคํผ๋ฅผ ์ด๋ ๊ฒ ํ๊ตฐ๋ฐ์ ๋ชจ์๋์
จ๊ตฐ์
์ด๊ฒ๋ ์ข์ ๋ฐฉ๋ฒ์ด๋ค ์งฑ์ด๋น
ANIMATION("์ ๋"), | ||
FOREIGN_SERIES("ํด์ธ์๋ฆฌ์ฆ"); | ||
|
||
fun getGenre(): String { |
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.
์ใ ์งฑ์ด๋ค ์ฝ๋ฆฌ ๋ฐ์ ์ผ๋ฌด์ง๊ฒ ํด์ฃผ์ จ๋ค์ ํํ
@@ -28,7 +28,7 @@ fun BoxOverlayImage( | |||
) { | |||
Box( | |||
modifier = modifier | |||
.width(180.dp) // ๋น์จ๋ก ์์ | |||
.width(180.dp) |
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.
๋น์จ๋ก ์์ ์ํ์
จ๋๋ฐ ์ ํฌ๋ ์ง์ฐ์ฌ!!
๊ธฐ๊ธฐ๋์์ ์ํด LocalCinfiguration์ ์ฌ์ฉํด์ ์์ ํด๋ณด์
์
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.
์ด๋ป๊ฒ ํ ์ง ๋ชจ๋ฅด๊ฒ ์ด์ ์ผ๋จ ๋๋๋ฐ ์๋ ค์ฃผ์ ๋๋ก ํด๋ณผ๊ฒ์. ๊ฐ์ฌํฉ๋๋ค.
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.
์๊ณ ํ์
จ์ต๋๋ค!
ํฉ์ธ๋ ํ์ด๋ต ~
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class BaseResponse<T>( |
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๋ฅผ ์ด๋ฐ ํํ๋ก ๊ฐ์ ธ๊ฐ์ ์ด์ ๊ฐ ์๋ ๊ถ๊ธํฉ๋๋ค!
import org.sopt.and.domain.model.auth.UserIdEntity | ||
import org.sopt.and.domain.model.auth.UserTokenEntity | ||
|
||
object AuthMapper { |
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.
ํด๋น mapper๋ฅผ domain์ ๋์ ์ด์ ๊ฐ ์๋์?
์ด mapper๋ data ๋ ์ด์ด์ ์๋ model์ ์ฐธ์กฐํ๊ธฐ ๋๋ฌธ์ ์ด๋ ๊ฒ ํ๋ฉด domain ๋ ์ด์ด๊ฐ data ๋ ์ด์ด์ ์์กดํ๊ฒ ๋ฉ๋๋ค.
์ด๋ ๊ฒ ๋๋ฉด ํด๋ฆฐ ์ํคํ
์ฒ๋ฅผ ๋ฐ๋ฅด์ง ์๊ฒ ๋๊ฒ ์ฃ ?
์ด๋ค ์์ผ๋ก ์์ ํ๋ฉด ์ข์์ง ๊ณ ๋ฏผํด๋ด
์๋ค!
@@ -0,0 +1,6 @@ | |||
package org.sopt.and.domain.model.auth | |||
|
|||
data class LoginUserEntity( |
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.
domain์ ๋ชจ๋ธ์ ์ ์ํ ๋ -Entity๋ผ๋ ๋ค์ด๋ฐ์ ์ฌ์ฉํ์๋ ์ด์ ๊ฐ ์๋์?
init { | ||
geyMyHobby() | ||
} |
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.
init ๋ธ๋ญ์ ์ด๋ป๊ฒ ๋์ํ ๊น์?
๊ทธ๋ฆฌ๊ณ ์ด๋ค ๋ก์ง๋ค์ ๋ด๋ ๊ฒ์ด ์ข์๊น์?
class TokenManager @Inject constructor( | ||
@ApplicationContext private val context: Context | ||
) { | ||
|
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.
companion object๋ ์ตํ๋จ์ ์ ์ด์ฃผ์๋ ๊ฒ์ด ์ปจ๋ฒค์ ์ ๋๋ค.
Related issue ๐
Work Description โ๏ธ
Screenshot ๐ธ
Toast ๋ฉ์์ง
์ ์ฒด ์คํ ์์
Uncompleted Tasks ๐
To Reviewers ๐ข