X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FTrustAjaxPage.kt;h=1dfb05882d30ce32ef21ffadbaee63b799b66516;hp=228a0b5a946dcfadc270f036404ffb0982def514;hb=8e313509a42a8c638fcac018dd73dd975bf9cb68;hpb=434e72844bb54f24fc7d2d26acc315d39ee3ba6f diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/TrustAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/TrustAjaxPage.kt index 228a0b5..1dfb058 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/TrustAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/TrustAjaxPage.kt @@ -15,9 +15,9 @@ class TrustAjaxPage(webInterface: WebInterface) : LoggedInJsonPage("trustSone.aj override fun createJsonObject(currentSone: Sone, request: FreenetRequest) = request.parameters["sone"] - .let(webInterface.core::getSone) - ?.let { webInterface.core.trustSone(currentSone, it) } - ?.let { createSuccessJsonObject().put("trustValue", webInterface.core.preferences.positiveTrust) } + ?.let(core::getSone) + ?.let { core.trustSone(currentSone, it) } + ?.let { createSuccessJsonObject().put("trustValue", core.preferences.positiveTrust) } ?: createErrorJsonObject("invalid-sone-id") }