X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FUnfollowSoneAjaxPage.kt;h=6889d04c68664207b64e1f565d07047e491442f8;hp=229765d2dbce6cdfed4a0264433f524c6decc0bb;hb=85b7420f3492af4e5591f62ad673309a76de7e04;hpb=77ada453ff332d62adb0a7820e428f6a0030093f diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPage.kt index 229765d..6889d04 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnfollowSoneAjaxPage.kt @@ -12,8 +12,8 @@ class UnfollowSoneAjaxPage(webInterface: WebInterface) : LoggedInJsonPage("unfol override fun createJsonObject(currentSone: Sone, request: FreenetRequest) = request.parameters["sone"] - ?.takeIf { webInterface.core.getSone(it).isPresent } - ?.also { webInterface.core.unfollowSone(currentSone, it) } + ?.takeIf { core.getSone(it).isPresent } + ?.also { core.unfollowSone(currentSone, it) } ?.let { createSuccessJsonObject() } ?: createErrorJsonObject("invalid-sone-id")