| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,7 @@ import javax.ws.rs.core.UriBuilder | |||
| 10 | 10 | ||
| 11 | 11 | import model.{CacheTime, Cached} | |
| 12 | 12 | import org.apache.http.HttpStatus | |
| 13 | + import play.twirl.api.Html | ||
| 13 | 14 | import rendering.core.Renderer | |
| 14 | 15 | import services.RedirectService.{ArchiveRedirect, Destination, PermanentRedirect} | |
| 15 | 16 | ||
@@ -29,9 +30,8 @@ class ArchiveController(redirects: RedirectService, renderer: Renderer, val cont | |||
| 29 | 30 | ||
| 30 | 31 | private val redirectHttpStatus = HttpStatus.SC_MOVED_PERMANENTLY | |
| 31 | 32 | ||
| 32 | - private[this] lazy val notFoundResult: Future[Result] = renderer | ||
| 33 | + private[this] lazy val notFoundHtml: Future[Html] = renderer | ||
| 33 | 34 | .render(ui.NotFound) | |
| 34 | - .map(html => Cached(CacheTime.NotFound)(WithoutRevalidationResult(NotFound(html)))) | ||
| 35 | 35 | ||
| 36 | 36 | def lookup(path: String): Action[AnyContent] = Action.async{ implicit request => | |
| 37 | 37 | ||
@@ -44,7 +44,8 @@ class ArchiveController(redirects: RedirectService, renderer: Renderer, val cont | |||
| 44 | 44 | .map(Future.successful) | |
| 45 | 45 | .getOrElse { | |
| 46 | 46 | log404(request) | |
| 47 | - notFoundResult | ||
| 47 | + notFoundHtml | ||
| 48 | + .map(html => Cached(CacheTime.NotFound)(WithoutRevalidationResult(NotFound(html)))) | ||
| 48 | 49 | } | |
| 49 | 50 | } | |
| 50 | 51 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments