X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FUnfollowSonePage.kt;fp=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FUnfollowSonePage.kt;h=2521ef08f2a09c117449334767185ce9235b5315;hp=ef4eab91582fc84487d5a8d0184cb7072b39575f;hb=9ce438f1c99c189c1c52622833a8d7e58a7fc0f2;hpb=74cbe983cd38da24847e6247ac595cb70d8e115b diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/UnfollowSonePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/UnfollowSonePage.kt index ef4eab9..2521ef0 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/UnfollowSonePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/UnfollowSonePage.kt @@ -11,13 +11,13 @@ import net.pterodactylus.util.template.TemplateContext /** * This page lets the user unfollow another Sone. */ -class UnfollowSonePage(template: Template, webInterface: WebInterface): +class UnfollowSonePage(template: Template, webInterface: WebInterface) : LoggedInPage("unfollowSone.html", template, "Page.UnfollowSone.Title", webInterface) { override fun handleRequest(freenetRequest: FreenetRequest, currentSone: Sone, templateContext: TemplateContext) { if (freenetRequest.isPOST) { - freenetRequest.parameters["sone"]!!.split(Regex("[ ,]+")) - .forEach { webInterface.core.unfollowSone(currentSone, it) } + freenetRequest.parameters["sone"]!!.split(Regex("[ ,]+")) + .forEach { webInterface.core.unfollowSone(currentSone, it) } throw RedirectException(freenetRequest.parameters["returnPage", 256]) } }