X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FDeleteReplyPage.kt;h=5a707cee3af2d0de09f605507ac1a19b7cea9297;hp=096ac0d695b92cca647f930d099c7aa5d82c7ff6;hb=ddc708d5b4cbebb3121fb000f44745f55b786e13;hpb=e3eabbebfe2b3fafe182769d0e3cc19d92979b04 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/DeleteReplyPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/DeleteReplyPage.kt index 096ac0d..5a707ce 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/DeleteReplyPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/DeleteReplyPage.kt @@ -1,9 +1,9 @@ package net.pterodactylus.sone.web +import net.pterodactylus.sone.utils.isPOST import net.pterodactylus.sone.web.page.FreenetRequest import net.pterodactylus.util.template.Template import net.pterodactylus.util.template.TemplateContext -import net.pterodactylus.util.web.Method.POST /** * This page lets the user delete a reply. @@ -16,7 +16,7 @@ class DeleteReplyPage(template: Template, webInterface: WebInterface): templateContext["reply"] = replyId val returnPage = request.httpRequest.getPartAsStringFailsafe("returnPage", 256) templateContext["returnPage"] = returnPage - if (request.method == POST) { + if (request.isPOST) { val reply = webInterface.core.getPostReply(replyId).orNull() ?: throw RedirectException("noPermission.html") if (!reply.sone.isLocal) { throw RedirectException("noPermission.html")