1 package net.pterodactylus.sone.web
3 import net.pterodactylus.sone.utils.isPOST
4 import net.pterodactylus.sone.web.page.FreenetRequest
5 import net.pterodactylus.util.template.Template
6 import net.pterodactylus.util.template.TemplateContext
9 * Lets the user delete a Sone. Of course the Sone is not really deleted from
10 * Freenet; merely all references to it are removed from the local plugin
13 class DeleteSonePage(template: Template, webInterface: WebInterface):
14 SoneTemplatePage("deleteSone.html", template, "Page.DeleteSone.Title", webInterface, true) {
16 override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) {
18 if (request.httpRequest.isPartSet("deleteSone")) {
19 webInterface.core.deleteSone(getCurrentSone(request.toadletContext))
21 throw RedirectException("index.html")