import net.pterodactylus.sone.web.WebInterface
import net.pterodactylus.sone.web.page.FreenetRequest
import net.pterodactylus.util.template.Template
import net.pterodactylus.sone.web.WebInterface
import net.pterodactylus.sone.web.page.FreenetRequest
import net.pterodactylus.util.template.Template
SoneTemplatePage("deleteImage.html", template, "Page.DeleteImage.Title", webInterface, true) {
override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) {
SoneTemplatePage("deleteImage.html", template, "Page.DeleteImage.Title", webInterface, true) {
override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) {
if (request.httpRequest.isPartSet("abortDelete")) {
throw RedirectException("imageBrowser.html?image=${image.id}")
}
webInterface.core.deleteImage(image)
throw RedirectException("imageBrowser.html?album=${image.album.id}")
}
if (request.httpRequest.isPartSet("abortDelete")) {
throw RedirectException("imageBrowser.html?image=${image.id}")
}
webInterface.core.deleteImage(image)
throw RedirectException("imageBrowser.html?album=${image.album.id}")
}