mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-07-11 19:45:24 +02:00
Version v5.4.0-beta1. Add authenticator to oauth retrofit.
This commit is contained in:
@ -56,9 +56,10 @@ abstract class NetworkModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Named("oauth")
|
@Named("oauth")
|
||||||
static Retrofit providesOAuthRetrofit(Retrofit retrofit) {
|
static Retrofit providesOAuthRetrofit(Retrofit retrofit, @Named("default") OkHttpClient okHttpClient) {
|
||||||
return retrofit.newBuilder()
|
return retrofit.newBuilder()
|
||||||
.baseUrl(APIUtils.OAUTH_API_BASE_URI)
|
.baseUrl(APIUtils.OAUTH_API_BASE_URI)
|
||||||
|
.client(okHttpClient)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,17 +193,6 @@ abstract class NetworkModule {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
|
||||||
@Named("strapi")
|
|
||||||
@Singleton
|
|
||||||
static Retrofit providestrapiRetrofit(@Named("default") OkHttpClient okHttpClient,
|
|
||||||
Retrofit retrofit) {
|
|
||||||
return retrofit.newBuilder()
|
|
||||||
.baseUrl(APIUtils.STRAPI_BASE_URI)
|
|
||||||
.client(okHttpClient)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Named("streamable")
|
@Named("streamable")
|
||||||
@Singleton
|
@Singleton
|
||||||
|
Reference in New Issue
Block a user