X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FUnlockSoneAjaxPage.kt;h=7d77c05f2e55e229a6855326f3c126ce511397d9;hb=7afd66a21244e757b6b49ba96bb3989bc55a2abf;hp=2dffbed4bc6f2a1cfc420bd176c0e7dac3ad5bef;hpb=8419f82ea9a6da6f4c8c564e13a2614be89ae3df;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.kt index 2dffbed..7d77c05 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnlockSoneAjaxPage.kt @@ -9,13 +9,13 @@ import net.pterodactylus.sone.web.page.FreenetRequest */ class UnlockSoneAjaxPage(webInterface: WebInterface) : JsonPage("unlockSone.ajax", webInterface) { - override fun requiresLogin() = false + override val requiresLogin = false override fun createJsonObject(request: FreenetRequest) = request.parameters["sone"] - ?.let(webInterface.core::getLocalSone) - ?.also(webInterface.core::unlockSone) - ?.also { webInterface.core.touchConfiguration() } + ?.let(core::getLocalSone) + ?.also(core::unlockSone) + ?.also { core.touchConfiguration() } ?.let { createSuccessJsonObject() } ?: createErrorJsonObject("invalid-sone-id")