diff --git a/app/com/gitpitch/controllers/PitchController.java b/app/com/gitpitch/controllers/PitchController.java index 08b39b8..cba2f14 100644 --- a/app/com/gitpitch/controllers/PitchController.java +++ b/app/com/gitpitch/controllers/PitchController.java @@ -26,7 +26,7 @@ package com.gitpitch.controllers; import com.gitpitch.git.GRS; import com.gitpitch.git.GRSManager; import com.gitpitch.models.GitRepoModel; -import com.gitpitch.models.MarkdownModel; +import com.gitpitch.models.Markdown; import com.gitpitch.executors.FrontEndThreads; import com.gitpitch.models.SlideshowModel; import com.gitpitch.services.PitchService; @@ -207,11 +207,11 @@ public class PitchController extends Controller { PitchParams pp = PitchParams.build(grsOnCall(grs), user, repo, branch, null, pitchme); - Optional mdmo = pitchService.cachedMarkdown(pp); + Optional mdmo = pitchService.cachedMarkdown(pp); if (mdmo.isPresent()) { - MarkdownModel mdm = mdmo.get(); + Markdown mdm = mdmo.get(); log.info("markdown: [ mdwn, cached, online ] {}", pp); return CompletableFuture.completedFuture(ok(mdm.produce()) .as("text/markdown")); diff --git a/app/com/gitpitch/services/PitchService.java b/app/com/gitpitch/services/PitchService.java index 7b287c9..7540b3a 100644 --- a/app/com/gitpitch/services/PitchService.java +++ b/app/com/gitpitch/services/PitchService.java @@ -24,6 +24,7 @@ package com.gitpitch.services; import com.gitpitch.models.GitRepoModel; +import com.gitpitch.models.Markdown; import com.gitpitch.models.MarkdownModel; import com.gitpitch.models.SlideshowModel; import com.gitpitch.policies.CacheTimeout; @@ -150,7 +151,7 @@ public class PitchService { /* * Return cached MarkdownModel, else Optional.empty. */ - public Optional cachedMarkdown(PitchParams pp) { + public Optional cachedMarkdown(PitchParams pp) { String mdmKey = MarkdownModel.genKey(pp); return Optional.ofNullable(pitchCache.get(mdmKey)); @@ -159,7 +160,7 @@ public class PitchService { /* * Return RepoModel. */ - public MarkdownModel fetchMarkdown(PitchParams pp) { + public Markdown fetchMarkdown(PitchParams pp) { log.debug("fetchMarkdown: pp={}", pp); CountDownLatch markdownLatch = gitService.fetchMarkdown(pp); @@ -177,8 +178,8 @@ public class PitchService { log.warn("fetchMarkdown: pp={}, markdownLatch.await ex={}", pp, ex); } - Optional mdmo = cachedMarkdown(pp); - MarkdownModel mdm = mdmo.orElse(null); + Optional mdmo = cachedMarkdown(pp); + Markdown mdm = mdmo.orElse(null); log.debug("fetchMarkdown: pp={}, returning mdm={}", pp, mdm); return mdm;