X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FUnbookmarkPage.kt;h=ec4242b66fadeb87b13cee9d76da794883254ac7;hp=01a0fde9beea3daa2dcffa73590a47d46cbf48b5;hb=d63b7445567b65ffdbd50fa8f7ffbfea1304dff9;hpb=3cb0e2c78bb37f2d70ecde92ad4fcf642de788a3 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/UnbookmarkPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/UnbookmarkPage.kt index 01a0fde..ec4242b 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/UnbookmarkPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/UnbookmarkPage.kt @@ -14,7 +14,7 @@ import net.pterodactylus.util.template.TemplateContext * Page that lets the user unbookmark a post. */ class UnbookmarkPage(template: Template, webInterface: WebInterface): - SoneTemplatePage("unbookmark.html", template, "Page.Unbookmark.Title", webInterface, false) { + SoneTemplatePage("unbookmark.html", webInterface, template, "Page.Unbookmark.Title") { override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) { when { @@ -26,8 +26,8 @@ class UnbookmarkPage(template: Template, webInterface: WebInterface): } freenetRequest.isPOST -> { freenetRequest.parameters["post", 36] - .let(webInterface.core::getPost) - .also(webInterface.core::unbookmarkPost) + ?.let(webInterface.core::getPost) + ?.also(webInterface.core::unbookmarkPost) throw RedirectException(freenetRequest.parameters["returnPage", 256]) } }