diff --git a/core/network/src/main/java/com/hmh/hamyeonham/core/network/di/NetModule.kt b/core/network/src/main/java/com/hmh/hamyeonham/core/network/di/NetModule.kt index c118ba2f..489345e3 100644 --- a/core/network/src/main/java/com/hmh/hamyeonham/core/network/di/NetModule.kt +++ b/core/network/src/main/java/com/hmh/hamyeonham/core/network/di/NetModule.kt @@ -7,7 +7,7 @@ import com.hmh.hamyeonham.common.qualifier.Secured import com.hmh.hamyeonham.common.qualifier.Unsecured import com.hmh.hamyeonham.core.network.auth.authenticator.HMHAuthenticator import com.hmh.hamyeonham.core.network.auth.interceptor.HeaderInterceptor -import com.hmh.hamyeonham.core.network.call.CustomResultCallAdapterFactory +import com.hmh.hamyeonham.core.network.call.ResultCallAdapterFactory import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory import dagger.Binds import dagger.Module @@ -88,13 +88,17 @@ object NetModule { .writeTimeout(15, TimeUnit.SECONDS) .build() + @Singleton + @Provides + fun provideResultCallAdapterFactory(): ResultCallAdapterFactory = ResultCallAdapterFactory() + @Singleton @Provides @Secured fun provideRetrofit( @Secured client: OkHttpClient, converterFactory: Converter.Factory, - resultCallAdapterFactory: CustomResultCallAdapterFactory, + resultCallAdapterFactory: ResultCallAdapterFactory, ): Retrofit = Retrofit.Builder() .baseUrl(HMHBaseUrl) .client(client) @@ -108,7 +112,7 @@ object NetModule { fun provideRetrofitNotNeededAuth( @Unsecured client: OkHttpClient, converterFactory: Converter.Factory, - resultCallAdapterFactory: CustomResultCallAdapterFactory, + resultCallAdapterFactory: ResultCallAdapterFactory, ): Retrofit = Retrofit.Builder() .baseUrl(HMHBaseUrl) .client(client)