X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FUntrustPage.kt;h=dd445c8292f0516a6182fbf06265aec3b4a0a98d;hb=97fe04482ebb8a08e43294acde041c2975cbd8ee;hp=f90adcff2a647c36681ea74f5717277dade2f333;hpb=c389ee8f5e6eacae70438c3f364e8674c09d1959;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 f90adcf..dd445c8 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/UntrustPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/UntrustPage.kt @@ -14,14 +14,14 @@ import javax.inject.* */ @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]) } }