X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FLikeAjaxPage.kt;h=576bf906e6120643dd50205c4d60a371a5da991b;hp=4257725f5cc38cf815f4d996ac296da6dd7b9ccc;hb=fafe0029dcbef27ce918fdf7007e78c8705ca20f;hpb=d920774a69518c31b5e66d36b830bcf95a5ec237 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/LikeAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/LikeAjaxPage.kt index 4257725..576bf90 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/LikeAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/LikeAjaxPage.kt @@ -20,7 +20,7 @@ class LikeAjaxPage(webInterface: WebInterface) : LoggedInJsonPage("like.ajax", w ?.let { createSuccessJsonObject() } ?: createErrorJsonObject("invalid-post-id") "reply" -> request.parameters["reply"] - .let(core::getPostReply) + ?.let(core::getPostReply) ?.let { currentSone.addLikedReplyId(it.id) } ?.also { core.touchConfiguration() } ?.let { createSuccessJsonObject() }