X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FRescuePage.kt;h=be0e4c15f0b1a9cd20873c5467c1b8dc35fc3d79;hp=af69a122e36ef2cac1581bb4c0c4930e95d5c5bc;hb=aaf780d3c2a6f5ce47295786f3963c8b93f6a145;hpb=2e6be6f2fb6afede009dacc48b8e3318e30e5057 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt index af69a12..be0e4c1 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/RescuePage.kt @@ -13,8 +13,9 @@ import javax.inject.* */ @MenuName("Rescue") @TemplatePath("/templates/rescue.html") +@ToadletPath("rescue.html") class RescuePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) : - LoggedInPage("rescue.html", "Page.Rescue.Title", webInterface, loaders, templateRenderer) { + LoggedInPage("Page.Rescue.Title", webInterface, loaders, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) { val soneRescuer = soneRequest.core.getSoneRescuer(currentSone) @@ -28,7 +29,7 @@ class RescuePage @Inject constructor(webInterface: WebInterface, loaders: Loader if (soneRequest.parameters["fetch", 8] == "true") { soneRescuer.startNextFetch() } - throw RedirectException("rescue.html") + redirectTo("rescue.html") } }