Clean up SoneTemplatePage’s constructors
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / BookmarkPage.kt
index 519d49e..a5c82cd 100644 (file)
@@ -10,13 +10,13 @@ import net.pterodactylus.util.template.TemplateContext
  * Page that lets the user bookmark a post.
  */
 class BookmarkPage(template: Template, webInterface: WebInterface)
-       : SoneTemplatePage("bookmark.html", template, "Page.Bookmark.Title", webInterface) {
+       : SoneTemplatePage("bookmark.html", webInterface, template, "Page.Bookmark.Title") {
 
        override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) {
                if (freenetRequest.isPOST) {
                        val returnPage = freenetRequest.httpRequest.getPartAsStringFailsafe("returnPage", 256)
                        val postId = freenetRequest.httpRequest.getPartAsStringFailsafe("post", 36)
-                       webInterface.core.getPost(postId).orNull()?.let {
+                       webInterface.core.getPost(postId)?.let {
                                webInterface.core.bookmarkPost(it)
                        }
                        throw RedirectException(returnPage)