X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FLockSoneAjaxPage.kt;h=8605fe6673452fc5a451c5e316ca78bc7c088097;hb=7afd66a21244e757b6b49ba96bb3989bc55a2abf;hp=add66b573f049bf42a1b7c3b88f987c904329576;hpb=e9bc5900da836a751d3af427fef61e84e9fb3690;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.kt index add66b5..8605fe6 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/LockSoneAjaxPage.kt @@ -9,12 +9,12 @@ import net.pterodactylus.sone.web.page.FreenetRequest */ class LockSoneAjaxPage(webInterface: WebInterface) : JsonPage("lockSone.ajax", webInterface) { - override fun requiresLogin() = false + override val requiresLogin = false override fun createJsonObject(request: FreenetRequest) = request.parameters["sone"] - .let(webInterface.core::getLocalSone) - ?.let(webInterface.core::lockSone) + .let(core::getLocalSone) + ?.let(core::lockSone) ?.let { createSuccessJsonObject() } ?: createErrorJsonObject("invalid-sone-id")