X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FLoginPage.kt;h=5be34ac05df7783ef7561f4b52af168451ecb270;hp=5d6915dce33edd2c6be34ada2f2a93db1f938823;hb=faf66247a34f64946990a985d2ea3003465969cb;hpb=c389ee8f5e6eacae70438c3f364e8674c09d1959 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt index 5d6915d..5be34ac 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt @@ -15,7 +15,7 @@ import javax.inject.* @TemplatePath("/templates/login.html") @ToadletPath("login.html") class LoginPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - SoneTemplatePage("login.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.Login.Title") { + SoneTemplatePage(webInterface, loaders, templateRenderer, pageTitleKey = "Page.Login.Title") { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) { if (soneRequest.isPOST) { @@ -23,7 +23,7 @@ class LoginPage @Inject constructor(webInterface: WebInterface, loaders: Loaders soneRequest.core.getLocalSone(soneId)?.let { sone -> setCurrentSone(soneRequest.toadletContext, sone) val target = soneRequest.httpRequest.getParam("target").emptyToNull ?: "index.html" - throw RedirectException(target) + redirectTo(target) } } templateContext["sones"] = soneRequest.core.localSones.sortedWith(Sone.NICE_NAME_COMPARATOR)