Use method from JsonPage
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 5 Oct 2017 19:18:14 +0000 (21:18 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 5 Oct 2017 19:18:22 +0000 (21:18 +0200)
src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt

index 853fe26..3103898 100644 (file)
@@ -30,7 +30,7 @@ class GetStatusAjaxPage(webInterface: WebInterface, private val elementLoader: E
        }
 
        override fun createJsonObject(request: FreenetRequest) =
        }
 
        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 {}
                                createSuccessJsonObject().apply {
                                        this["loggedIn"] = currentSone != null
                                        this["options"] = currentSone?.options?.toJsonOptions() ?: jsonObject {}