X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FTrustPage.kt;h=54edc5d55b27afb833e4f2e540e95e898c95f143;hb=5d7419dfefdc2c98ac478068fcc727359ec8bfe4;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 index 9fc8c41..54edc5d 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/TrustPage.kt @@ -14,14 +14,14 @@ import javax.inject.* */ @ToadletPath("trust.html") class TrustPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - LoggedInPage("trust.html", "Page.Trust.Title", webInterface, loaders, templateRenderer) { + LoggedInPage("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]) + redirectTo(soneRequest.parameters["returnPage", 256]) } }