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/?p=Sone.git;a=commitdiff_plain;h=00055a1a051da557460d6e0a9505e88074783e08 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 {}