X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FCreateSonePage.kt;h=0b690da517c2dd3bc6a84cce57e5c0bfc8ad5616;hb=faf66247a34f64946990a985d2ea3003465969cb;hp=ef0c3043b752123ea2051d2caeed7db595d3e696;hpb=2e6be6f2fb6afede009dacc48b8e3318e30e5057;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateSonePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateSonePage.kt index ef0c304..0b690da 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateSonePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/CreateSonePage.kt @@ -14,8 +14,9 @@ import javax.inject.* */ @MenuName("CreateSone") @TemplatePath("/templates/createSone.html") +@ToadletPath("createSone.html") class CreateSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - SoneTemplatePage("createSone.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.CreateSone.Title") { + SoneTemplatePage(webInterface, loaders, templateRenderer, pageTitleKey = "Page.CreateSone.Title") { private val logger = Logger.getLogger(CreateSonePage::class.java.name) @@ -30,7 +31,7 @@ class CreateSonePage @Inject constructor(webInterface: WebInterface, loaders: Lo logger.log(Level.SEVERE, "Could not create Sone for OwnIdentity: $ownIdentity") } setCurrentSone(soneRequest.toadletContext, sone) - throw RedirectException("index.html") + redirectTo("index.html") } templateContext["errorNoIdentity"] = true }