Skip to content

Commit

Permalink
Inline base url since it's only used in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
keyboardsurfer authored and florina-muntenescu committed Dec 30, 2018
1 parent def815a commit ff0c337
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@ class DribbbleDataModule {
fun provideConverterFactory(): DribbbleSearchConverter.Factory =
DribbbleSearchConverter.Factory()

@Provides
fun provideBaseUrl(): String = DribbbleSearchService.ENDPOINT

@Provides
fun provideDribbbleSearchService(
baseUrl: String,
converterFactory: DribbbleSearchConverter.Factory,
callAdapterFactory: CoroutineCallAdapterFactory
): DribbbleSearchService =
Retrofit.Builder()
.baseUrl(baseUrl)
.baseUrl(DribbbleSearchService.ENDPOINT)
.addConverterFactory(converterFactory)
.addCallAdapterFactory(callAdapterFactory)
.build()
Expand Down

0 comments on commit ff0c337

Please sign in to comment.