|
@@ -48,6 +48,7 @@ private fun Exchange.getQueries() =
|
|
// HANDLERS
|
|
// HANDLERS
|
|
private fun Exchange.listFortunes(store: Repository) {
|
|
private fun Exchange.listFortunes(store: Repository) {
|
|
val fortunes = store.findFortunes() + Fortune(0, "Additional fortune added at request time.")
|
|
val fortunes = store.findFortunes() + Fortune(0, "Additional fortune added at request time.")
|
|
|
|
+ response.contentType = "text/html; charset=utf-8"
|
|
template("fortunes.html", "fortunes" to fortunes.sortedBy { it.message })
|
|
template("fortunes.html", "fortunes" to fortunes.sortedBy { it.message })
|
|
}
|
|
}
|
|
|
|
|