🔥 Remove possibility to fetch a custom edition
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / RescuePage.kt
index af69a12..b93d09a 100644 (file)
@@ -13,22 +13,18 @@ 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)
                templateContext["soneRescuer"] = soneRescuer
                if (soneRequest.isPOST) {
-                       soneRequest.parameters["edition", 9]?.toIntOrNull()?.also {
-                               if (it > -1) {
-                                       soneRescuer.setEdition(it.toLong())
-                               }
-                       }
                        if (soneRequest.parameters["fetch", 8] == "true") {
                                soneRescuer.startNextFetch()
                        }
-                       throw RedirectException("rescue.html")
+                       redirectTo("rescue.html")
                }
        }