Remove obsolete loading animation
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / DeleteProfileFieldPage.kt
index b053eab..c957bd7 100644 (file)
@@ -1,9 +1,9 @@
 package net.pterodactylus.sone.web
 
+import net.pterodactylus.sone.utils.isPOST
 import net.pterodactylus.sone.web.page.FreenetRequest
 import net.pterodactylus.util.template.Template
 import net.pterodactylus.util.template.TemplateContext
-import net.pterodactylus.util.web.Method.POST
 
 /**
  * Page that lets the user confirm the deletion of a profile field.
@@ -15,7 +15,7 @@ class DeleteProfileFieldPage(template: Template, webInterface: WebInterface):
                val currentSone = getCurrentSone(request.toadletContext)
                val field = currentSone.profile.getFieldById(request.httpRequest.getPartAsStringFailsafe("field", 36)) ?: throw RedirectException("invalid.html")
                templateContext["field"] = field
-               if (request.method == POST) {
+               if (request.isPOST) {
                        if (request.httpRequest.getPartAsStringFailsafe("confirm", 4) == "true") {
                                currentSone.profile = currentSone.profile.apply { removeField(field) }
                        }