X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetPostAjaxPage.kt;h=d91fe90b409f03eaa0657009dbc8f904a8895e91;hp=2d902a66e23c596132d70b9e79d7e563ea4e9a88;hb=4a74200598acbc920892740918d2d2637c80fd1f;hpb=fafe0029dcbef27ce918fdf7007e78c8705ca20f diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.kt index 2d902a6..d91fe90 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.kt @@ -19,8 +19,8 @@ class GetPostAjaxPage(webInterface: WebInterface, private val postTemplate: Temp override fun createJsonObject(currentSone: Sone, request: FreenetRequest) = request.parameters["post"] - .let(core::getPost) - .let { post -> + ?.let(core::getPost) + ?.let { post -> createSuccessJsonObject(). put("post", jsonObject( "id" to post.id,