X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FTrustPage.kt;h=9a4c02ff362c39c0adafd70761ea56614efe91ec;hb=HEAD;hp=758ae0703002a7de6f93c09105be2be0d01c75b1;hpb=6f1f26e3998cfef155b0cf59152827accea70d30;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt deleted file mode 100644 index 758ae07..0000000 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt +++ /dev/null @@ -1,27 +0,0 @@ -package net.pterodactylus.sone.web.pages - -import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.utils.isPOST -import net.pterodactylus.sone.utils.parameters -import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import net.pterodactylus.util.template.Template -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) : - 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) - } - throw RedirectException(freenetRequest.parameters["returnPage", 256]) - } - } - -}