X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FTrustPage.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FTrustPage.kt;h=758ae0703002a7de6f93c09105be2be0d01c75b1;hp=b6fb03890577dc0e9b832415f42060964c2515d5;hb=9ce438f1c99c189c1c52622833a8d7e58a7fc0f2;hpb=74cbe983cd38da24847e6247ac595cb70d8e115b diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt index b6fb038..758ae07 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt @@ -12,14 +12,14 @@ import net.pterodactylus.util.template.TemplateContext * Page that lets the user trust another Sone. This will assign a configurable * amount of trust to an identity. */ -class TrustPage(template: Template, webInterface: WebInterface): +class TrustPage(template: Template, webInterface: WebInterface) : LoggedInPage("trust.html", template, "Page.Trust.Title", webInterface) { override fun handleRequest(freenetRequest: FreenetRequest, currentSone: Sone, templateContext: TemplateContext) { if (freenetRequest.isPOST) { - webInterface.core.getSone(freenetRequest.parameters["sone"]!!)?.let { sone -> - webInterface.core.trustSone(currentSone, sone) - } + webInterface.core.getSone(freenetRequest.parameters["sone"]!!)?.let { sone -> + webInterface.core.trustSone(currentSone, sone) + } throw RedirectException(freenetRequest.parameters["returnPage", 256]) } }