Return nullable Post instead of Optional
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / ViewPostPage.kt
index d331417..910c939 100644 (file)
@@ -16,7 +16,7 @@ class ViewPostPage(template: Template, webInterface: WebInterface):
                SoneTemplatePage("viewPost.html", template, "Page.ViewPost.Title", webInterface, false) {
 
        override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) {
-               templateContext["post"] = freenetRequest.parameters["post"]?.let(webInterface.core::getPost)?.orNull()
+               templateContext["post"] = freenetRequest.parameters["post"]?.let(webInterface.core::getPost)
                templateContext["raw"] = freenetRequest.parameters["raw"] == "true"
        }