X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FUntrustPage.kt;h=dd445c8292f0516a6182fbf06265aec3b4a0a98d;hb=aaf780d3c2a6f5ce47295786f3963c8b93f6a145;hp=288942c37e209af7681f3e24729691afefbfd886;hpb=a76956e389fcfe6282ad4ca7156bbf76327bb0c0;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 288942c..dd445c8 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/UntrustPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/UntrustPage.kt @@ -12,15 +12,16 @@ import javax.inject.* * Page that lets the user untrust another Sone. This will remove all trust * assignments for an identity. */ +@ToadletPath("untrust.html") class UntrustPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - LoggedInPage("untrust.html", "Page.Untrust.Title", webInterface, loaders, templateRenderer) { + LoggedInPage("Page.Untrust.Title", webInterface, loaders, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) { if (soneRequest.isPOST) { soneRequest.parameters["sone", 44]!! .let(soneRequest.core::getSone) ?.also { soneRequest.core.untrustSone(currentSone, it) } - throw RedirectException(soneRequest.parameters["returnPage", 256]) + redirectTo(soneRequest.parameters["returnPage", 256]) } }