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=6930e45d465ee3616fe8fe1a746d9429877ec557;hb=4a74200598acbc920892740918d2d2637c80fd1f;hpb=5ebcf8e99818206776539ab6610461dc4386a304 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 6930e45..96fb7e4 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.kt @@ -27,7 +27,7 @@ class GetTimesAjaxPage(webInterface: WebInterface, 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) } } }