From: David ‘Bombe’ Roden Date: Thu, 5 Oct 2017 19:18:14 +0000 (+0200) Subject: Use method from JsonPage X-Git-Tag: 0.9.7^2~21 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=00055a1a051da557460d6e0a9505e88074783e08;hp=626a2e839efe6c5c912bc6efa1a0cc6c9c8576c2;p=Sone.git Use method from JsonPage --- diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt index 853fe26..3103898 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt @@ -30,7 +30,7 @@ class GetStatusAjaxPage(webInterface: WebInterface, private val elementLoader: E } override fun createJsonObject(request: FreenetRequest) = - webInterface.getCurrentSoneWithoutCreatingSession(request.toadletContext).let { currentSone -> + getCurrentSone(request.toadletContext, false).let { currentSone -> createSuccessJsonObject().apply { this["loggedIn"] = currentSone != null this["options"] = currentSone?.options?.toJsonOptions() ?: jsonObject {}