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=9fc8c41e0542fcadec0665060c2d8f5d6c56d688;hpb=c389ee8f5e6eacae70438c3f364e8674c09d1959;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 9fc8c41..0000000 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt +++ /dev/null @@ -1,28 +0,0 @@ -package net.pterodactylus.sone.web.pages - -import net.pterodactylus.sone.data.* -import net.pterodactylus.sone.main.* -import net.pterodactylus.sone.utils.* -import net.pterodactylus.sone.web.* -import net.pterodactylus.sone.web.page.* -import net.pterodactylus.util.template.* -import javax.inject.* - -/** - * Page that lets the user trust another Sone. This will assign a configurable - * amount of trust to an identity. - */ -@ToadletPath("trust.html") -class TrustPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - LoggedInPage("trust.html", "Page.Trust.Title", webInterface, loaders, templateRenderer) { - - override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) { - if (soneRequest.isPOST) { - soneRequest.core.getSone(soneRequest.parameters["sone"]!!)?.let { sone -> - soneRequest.core.trustSone(currentSone, sone) - } - throw RedirectException(soneRequest.parameters["returnPage", 256]) - } - } - -}