Use a property for “needsFormPassword” instead of a method
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / ajax / GetStatusAjaxPage.kt
index e2642c9..925f628 100644 (file)
@@ -49,7 +49,7 @@ class GetStatusAjaxPage(webInterface: WebInterface, private val elementLoader: E
 
        private fun String.asJson() = ObjectMapper().readTree(this).asIterable()
 
-       override fun needsFormPassword() = false
+       override val needsFormPassword = false
        override fun requiresLogin() = false
 
        private fun SoneOptions.toJsonOptions() = jsonObject {
@@ -64,8 +64,8 @@ class GetStatusAjaxPage(webInterface: WebInterface, private val elementLoader: E
                        put("name", SoneAccessor.getNiceName(sone))
                        put("local", sone.isLocal)
                        put("status", sone.status.name)
-                       put("modified", webInterface.core.isModifiedSone(sone))
-                       put("locked", webInterface.core.isLocked(sone))
+                       put("modified", core.isModifiedSone(sone))
+                       put("locked", core.isLocked(sone))
                        put("lastUpdatedUnknown", sone.time == 0L)
                        synchronized(dateFormatter) {
                                put("lastUpdated", dateFormatter.format(sone.time))