diff options
Diffstat (limited to 'src/main/java/com/juick/config')
-rw-r--r-- | src/main/java/com/juick/config/AppConfig.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/juick/config/AppConfig.java b/src/main/java/com/juick/config/AppConfig.java index 32926bd1..2963ee27 100644 --- a/src/main/java/com/juick/config/AppConfig.java +++ b/src/main/java/com/juick/config/AppConfig.java @@ -28,6 +28,7 @@ import com.mitchellbosecke.pebble.extension.FormatterExtension; import com.overzealous.remark.Options; import com.overzealous.remark.Remark; +import com.patreon.PatreonAPI; import io.pebbletemplates.pebble.PebbleEngine; import io.pebbletemplates.pebble.loader.ClasspathLoader; import io.pebbletemplates.pebble.loader.Loader; @@ -65,6 +66,8 @@ public class AppConfig { private Resource keystore; @Value("${keystore_password:secret}") private String keystorePassword; + @Value("${patreon_creator_access_token:secret}") + private String creatorAccessToken; @Bean KeystoreManager keystoreManager() { @@ -169,6 +172,12 @@ public class AppConfig { } @Bean + PatreonAPI patreonClient() { + return new PatreonAPI(creatorAccessToken); + } + + + @Bean ViewResolver viewResolver() { PebbleViewResolver viewResolver = new PebbleViewResolver(pebbleEngine()); viewResolver.setPrefix("templates"); |