X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetTimesAjaxPage.kt;h=96fb7e42cf9f95bce386a0117be92b41f940d949;hp=759cdc0222457815a1126e73c7d61b81003a502f;hb=4a74200598acbc920892740918d2d2637c80fd1f;hpb=4bf90851f9e7a8f31d4f58f4f74dc46d8e4ddec8 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.kt index 759cdc0..96fb7e4 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.kt @@ -23,11 +23,11 @@ class GetTimesAjaxPage(webInterface: WebInterface, } override val needsFormPassword = false - override fun requiresLogin() = false + override val requiresLogin = false override fun createJsonObject(request: FreenetRequest) = createSuccessJsonObject().apply { - put("postTimes", request.parameters["posts"]!!.idsToJson { core.getPost(it)?.let { it.id to it.time } }) + put("postTimes", request.parameters["posts"]!!.idsToJson { core.getPost(it).let { it.id to it.time } }) put("replyTimes", request.parameters["replies"]!!.idsToJson { core.getPostReply(it)?.let { it.id to it.time } }) } @@ -43,7 +43,7 @@ class GetTimesAjaxPage(webInterface: WebInterface, "tooltip" to synchronized(dateTimeFormatter) { dateTimeFormatter.format(time) }) - }.forEach { this@jsonObject.put(it.first, it.second) } + }.forEach { this@jsonObject.set(it.first, it.second) } } }