Skip to content

Commit

Permalink
Minor clarity improvements to addTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfrog26 committed Aug 21, 2019
1 parent bb7a178 commit c5da38e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/jvm/src/main/scala/io/youi/app/ServerApplication.scala
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ trait ServerApplication extends YouIApplication with Server {
val url = httpConnection.request.url
val fileName = url.path.decoded
val mapped = mappings.toStream.flatMap(_ (httpConnection)).headOption
val withHTML = if (excludeDotHTML) {
val content = lookup(fileName).orElse { if (excludeDotHTML) {
lookup(s"$fileName.html")
} else {
None
}
mapped.orElse(lookup(fileName).orElse(withHTML)).map { content =>
}}
mapped.orElse(content).map { content =>
if (content.contentType == ContentType.`text/html`) {
CachingManager.NotCached.handle(httpConnection)
serveHTML(httpConnection, content, deltas, includeApplication(url))
Expand Down

0 comments on commit c5da38e

Please sign in to comment.