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=82f6da1e43bcbbd050debbb8be6bd42f5f89581f;hp=ce5aaec05d366a2435df9c2c916dc0bcb6787ffb;hb=8e313509a42a8c638fcac018dd73dd975bf9cb68;hpb=943bbf6848a5975cb994f75f812ef215af62475f 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 ce5aaec..82f6da1 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/DistrustPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/DistrustPage.kt @@ -17,8 +17,8 @@ class DistrustPage(template: Template, webInterface: WebInterface): 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) } + webInterface.core.getSone(freenetRequest.httpRequest.getPartAsStringFailsafe("sone", 44)) + ?.run { webInterface.core.distrustSone(getCurrentSone(freenetRequest.toadletContext), this) } throw RedirectException(freenetRequest.httpRequest.getPartAsStringFailsafe("returnPage", 256)) } }