X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FDeleteSonePage.kt;h=3f99730fc3eeeaf037916b3f0772cebd06f3d30e;hp=61b47503e8a3de19978f6281b26237eb3a044489;hb=HEAD;hpb=c389ee8f5e6eacae70438c3f364e8674c09d1959 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt index 61b4750..3f99730 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt @@ -17,14 +17,14 @@ import javax.inject.* @TemplatePath("/templates/deleteSone.html") @ToadletPath("deleteSone.html") class DeleteSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - LoggedInPage("deleteSone.html", "Page.DeleteSone.Title", webInterface, loaders, templateRenderer) { + LoggedInPage("Page.DeleteSone.Title", webInterface, loaders, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) { if (soneRequest.isPOST) { if (soneRequest.httpRequest.isPartSet("deleteSone")) { soneRequest.core.deleteSone(currentSone) } - throw RedirectException("index.html") + redirectTo("index.html") } }