X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FCreateAlbumPage.kt;h=e91ad3761136b7fb8a9d92303481b18b7b9e00b5;hb=dd96e781b592c3bae9b0f66f85ba05a4e4cc18ce;hp=5d47641a8b2057b0e1b625045fddfe0fabc01fcf;hpb=fe8a83bdb1d644d4d1bf4342feab4c58115409b3;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.kt b/src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.kt index 5d47641..e91ad37 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.kt +++ b/src/main/java/net/pterodactylus/sone/web/CreateAlbumPage.kt @@ -2,10 +2,10 @@ package net.pterodactylus.sone.web import net.pterodactylus.sone.data.Album.Modifier.AlbumTitleMustNotBeEmpty import net.pterodactylus.sone.text.TextFilter +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 create a new album. @@ -14,7 +14,7 @@ class CreateAlbumPage(template: Template, webInterface: WebInterface): SoneTemplatePage("createAlbum.html", template, "Page.CreateAlbum.Title", webInterface, true) { override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) { - if (request.method == POST) { + if (request.isPOST) { val name = request.httpRequest.getPartAsStringFailsafe("name", 64).trim() if (name.isEmpty()) { templateContext["nameMissing"] = true