X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetReplyAjaxPage.kt;h=c6cfc2f0e37044dd221e874c82e17828cfd96d3f;hp=332ab87f3142884f30735a8ae526b43a058d40cd;hb=889119651988ace06a94568a661f29b87f1af99e;hpb=85b7420f3492af4e5591f62ad673309a76de7e04 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetReplyAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetReplyAjaxPage.kt index 332ab87..c6cfc2f 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetReplyAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetReplyAjaxPage.kt @@ -3,7 +3,6 @@ package net.pterodactylus.sone.web.ajax import net.pterodactylus.sone.data.PostReply import net.pterodactylus.sone.data.Sone import net.pterodactylus.sone.utils.jsonObject -import net.pterodactylus.sone.utils.let import net.pterodactylus.sone.utils.parameters import net.pterodactylus.sone.utils.render import net.pterodactylus.sone.web.WebInterface @@ -15,11 +14,11 @@ import net.pterodactylus.util.template.Template */ class GetReplyAjaxPage(webInterface: WebInterface, private val template: Template) : LoggedInJsonPage("getReply.ajax", webInterface) { - override fun needsFormPassword() = false + override val needsFormPassword = false override fun createJsonObject(currentSone: Sone, request: FreenetRequest) = request.parameters["reply"] - .let(core::getPostReply) + ?.let(core::getPostReply) ?.let { it.toJson(currentSone, request) } ?.let { replyJson -> createSuccessJsonObject().apply {