-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(backend): move DailymotionUpdater to non Reactive API
Related to #231
- Loading branch information
1 parent
8d5d51a
commit 1353981
Showing
5 changed files
with
186 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 6 additions & 9 deletions
15
...m/github/davinkevin/podcastserver/update/updaters/dailymotion/DailymotionUpdaterConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
package com.github.davinkevin.podcastserver.update.updaters.dailymotion | ||
|
||
import com.github.davinkevin.podcastserver.service.image.ImageServiceConfig | ||
import com.github.davinkevin.podcastserver.service.image.ImageService | ||
import com.github.davinkevin.podcastserver.service.image.ImageServiceConfig | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
import org.springframework.context.annotation.Import | ||
import org.springframework.web.reactive.function.client.WebClient | ||
import org.springframework.web.client.RestClient | ||
|
||
/** | ||
* Created by kevin on 13/03/2020 | ||
*/ | ||
@Configuration | ||
@Import(ImageServiceConfig::class) | ||
class DailymotionUpdaterConfig { | ||
|
||
@Bean | ||
fun dailymotionUpdater( | ||
wcb: WebClient.Builder, | ||
image: ImageService | ||
rcb: RestClient.Builder, | ||
image: ImageService | ||
): DailymotionUpdater { | ||
val wc = wcb.clone().baseUrl("https://api.dailymotion.com").build() | ||
val rc = rcb.clone().baseUrl("https://api.dailymotion.com").build() | ||
|
||
return DailymotionUpdater(wc, image) | ||
return DailymotionUpdater(rc, image) | ||
} | ||
} |
Oops, something went wrong.