X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FDistrustPage.kt;h=ce5aaec05d366a2435df9c2c916dc0bcb6787ffb;hp=d23d0e787817e7e915dde32eae91716ff4861fae;hb=3cb0e2c78bb37f2d70ecde92ad4fcf642de788a3;hpb=cec099ef08feaff5332b81885ad989dbcb0fdfba diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/DistrustPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/DistrustPage.kt index d23d0e7..ce5aaec 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/DistrustPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/DistrustPage.kt @@ -15,11 +15,11 @@ import net.pterodactylus.util.template.TemplateContext class DistrustPage(template: Template, webInterface: WebInterface): SoneTemplatePage("distrust.html", template, "Page.Distrust.Title", webInterface, true) { - override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) { - if (request.isPOST) { - val sone = webInterface.core.getSone(request.httpRequest.getPartAsStringFailsafe("sone", 44)).orNull() - sone?.run { webInterface.core.distrustSone(getCurrentSone(request.toadletContext), this) } - throw RedirectException(request.httpRequest.getPartAsStringFailsafe("returnPage", 256)) + override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) { + if (freenetRequest.isPOST) { + val sone = webInterface.core.getSone(freenetRequest.httpRequest.getPartAsStringFailsafe("sone", 44)).orNull() + sone?.run { webInterface.core.distrustSone(getCurrentSone(freenetRequest.toadletContext), this) } + throw RedirectException(freenetRequest.httpRequest.getPartAsStringFailsafe("returnPage", 256)) } }