X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FUntrustAjaxPage.kt;h=8418cd34ee0029016f4bb6f85d8970eb69beff3b;hp=e622554a4aa64e884e1f1242c4dadab2a01c3b6c;hb=ea7ad5e87074576d17b7df74365a726bd95d7665;hpb=bffa2f59940c78942d57897971702d03e10cdc20 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/UntrustAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/UntrustAjaxPage.kt index e622554..8418cd3 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/UntrustAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/UntrustAjaxPage.kt @@ -1,8 +1,6 @@ package net.pterodactylus.sone.web.ajax import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.utils.also -import net.pterodactylus.sone.utils.let import net.pterodactylus.sone.utils.parameters import net.pterodactylus.sone.web.WebInterface import net.pterodactylus.sone.web.page.FreenetRequest @@ -14,8 +12,8 @@ class UntrustAjaxPage(webInterface: WebInterface) : LoggedInJsonPage("untrustSon override fun createJsonObject(currentSone: Sone, request: FreenetRequest) = request.parameters["sone"] - ?.let(webInterface.core::getSone) - ?.also { webInterface.core.untrustSone(currentSone, it) } + ?.let(core::getSone) + ?.also { core.untrustSone(currentSone, it) } ?.let { createSuccessJsonObject() } ?: createErrorJsonObject("invalid-sone-id")