X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FUntrustPage.kt;h=74a34b8ccef242984875e86de30713fe3aeb3219;hb=1557106d0e373f7efc15faed65f69eb567613a45;hp=ad344322bbf81096b4914fa05abfd7437ae0072b;hpb=74cbe983cd38da24847e6247ac595cb70d8e115b;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/UntrustPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/UntrustPage.kt index ad34432..74a34b8 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/UntrustPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/UntrustPage.kt @@ -7,19 +7,20 @@ 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 +import javax.inject.Inject /** * Page that lets the user untrust another Sone. This will remove all trust * assignments for an identity. */ -class UntrustPage(template: Template, webInterface: WebInterface): +class UntrustPage @Inject constructor(template: Template, webInterface: WebInterface) : LoggedInPage("untrust.html", template, "Page.Untrust.Title", webInterface) { override fun handleRequest(freenetRequest: FreenetRequest, currentSone: Sone, templateContext: TemplateContext) { if (freenetRequest.isPOST) { - freenetRequest.parameters["sone", 44]!! - .let(webInterface.core::getSone) - ?.also { webInterface.core.untrustSone(currentSone, it) } + freenetRequest.parameters["sone", 44]!! + .let(webInterface.core::getSone) + ?.also { webInterface.core.untrustSone(currentSone, it) } throw RedirectException(freenetRequest.parameters["returnPage", 256]) } }