FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix compilation error · devhttps/frontend@cb3ee7a · GitHub

Commit cb3ee7a

Browse files
committed
Fix compilation error
1 parent b6b0c68 commit cb3ee7a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎archive/app/controllers/ArchiveController.scala‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import javax.ws.rs.core.UriBuilder
1010

1111
import model.{CacheTime, Cached}
1212
import org.apache.http.HttpStatus
13+
import play.twirl.api.Html
1314
import rendering.core.Renderer
1415
import services.RedirectService.{ArchiveRedirect, Destination, PermanentRedirect}
1516

@@ -29,9 +30,8 @@ class ArchiveController(redirects: RedirectService, renderer: Renderer, val cont
2930

3031
private val redirectHttpStatus = HttpStatus.SC_MOVED_PERMANENTLY
3132

32-
private[this] lazy val notFoundResult: Future[Result] = renderer
33+
private[this] lazy val notFoundHtml: Future[Html] = renderer
3334
.render(ui.NotFound)
34-
.map(html => Cached(CacheTime.NotFound)(WithoutRevalidationResult(NotFound(html))))
3535

3636
def lookup(path: String): Action[AnyContent] = Action.async{ implicit request =>
3737

@@ -44,7 +44,8 @@ class ArchiveController(redirects: RedirectService, renderer: Renderer, val cont
4444
.map(Future.successful)
4545
.getOrElse {
4646
log404(request)
47-
notFoundResult
47+
notFoundHtml
48+
.map(html => Cached(CacheTime.NotFound)(WithoutRevalidationResult(NotFound(html))))
4849
}
4950
}
5051

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL