X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FUnfollowSoneAjaxPage.kt;h=6889d04c68664207b64e1f565d07047e491442f8;hb=ffd92ca2374c0b2218e583d02e0bdd24b8c110ae;hp=229765d2dbce6cdfed4a0264433f524c6decc0bb;hpb=041a849c146bb1aa8980f97f3c2adb6653b6f8ca;p=Sone.git 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")