Skip to content

Commit 7315ecc

Browse files
committed
[MERGE] #339 충돌 해결
1 parent a390166 commit 7315ecc

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

app/src/main/java/com/runnect/runnect/di/RetrofitModule.kt

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import com.runnect.runnect.BuildConfig
66
import com.runnect.runnect.application.ApplicationClass
77
import com.runnect.runnect.data.network.calladapter.ResultCallAdapterFactory
88
import com.runnect.runnect.data.network.interceptor.ResponseInterceptor
9-
import com.runnect.runnect.data.service.*
109
import com.runnect.runnect.data.repository.*
10+
import com.runnect.runnect.data.service.*
1111
import com.runnect.runnect.data.source.remote.*
1212
import com.runnect.runnect.domain.*
1313
import com.runnect.runnect.util.ApiLogger
@@ -54,32 +54,29 @@ object RetrofitModule {
5454
@Retention(AnnotationRetention.BINARY)
5555
annotation class Auth
5656

57+
5758
@Provides
5859
@Singleton
5960
@HttpClient
6061
fun provideOkHttpClient(
6162
logger: HttpLoggingInterceptor,
62-
appInterceptor: AppInterceptor,
63-
tokenAuthenticator: TokenAuthenticator
63+
@Auth authInterceptor: Interceptor
6464
): OkHttpClient = OkHttpClient.Builder()
6565
.addInterceptor(logger)
66-
.addInterceptor(appInterceptor)
67-
.authenticator(tokenAuthenticator)
66+
.addInterceptor(authInterceptor)
6867
.build()
6968

7069
@Provides
7170
@Singleton
7271
@HttpClientV2
7372
fun provideOkHttpClientV2(
7473
logger: HttpLoggingInterceptor,
75-
appInterceptor: AppInterceptor,
74+
@Auth authInterceptor: Interceptor,
7675
responseInterceptor: ResponseInterceptor,
77-
tokenAuthenticator: TokenAuthenticator
7876
): OkHttpClient = OkHttpClient.Builder()
7977
.addInterceptor(logger)
80-
.addInterceptor(appInterceptor)
78+
.addInterceptor(authInterceptor)
8179
.addInterceptor(responseInterceptor)
82-
.authenticator(tokenAuthenticator)
8380
.build()
8481

8582
@Provides
@@ -93,16 +90,10 @@ object RetrofitModule {
9390
@Auth
9491
fun provideAuthInterceptor(interceptor: AuthInterceptor): Interceptor = interceptor
9592

96-
fun provideAppInterceptor(): AppInterceptor = AppInterceptor()
97-
9893
@Provides
9994
@Singleton
10095
fun provideResponseInterceptor(): ResponseInterceptor = ResponseInterceptor()
10196

102-
@Provides
103-
@Singleton
104-
fun provideTokenAuthenticator(): TokenAuthenticator =
105-
TokenAuthenticator(ApplicationClass.appContext)
10697

10798
@OptIn(ExperimentalSerializationApi::class, InternalCoroutinesApi::class)
10899
@Provides

0 commit comments

Comments
 (0)