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=2b1deca1215e81184b0a37cf592a003a6a59a62f;hp=eb8d8a05678607c3b4092c866e4154dfb59f6714;hb=85b7420f3492af4e5591f62ad673309a76de7e04;hpb=77ada453ff332d62adb0a7820e428f6a0030093f 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 eb8d8a0..2b1deca 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetPostAjaxPage.kt @@ -19,7 +19,7 @@ class GetPostAjaxPage(webInterface: WebInterface, private val postTemplate: Temp override fun createJsonObject(currentSone: Sone, request: FreenetRequest) = request.parameters["post"] - .let(webInterface.core::getPost) + .let(core::getPost) .let { post -> createSuccessJsonObject(). put("post", jsonObject( @@ -33,11 +33,11 @@ class GetPostAjaxPage(webInterface: WebInterface, private val postTemplate: Temp private fun Post.render(currentSone: Sone, request: FreenetRequest) = webInterface.templateContextFactory.createTemplateContext().apply { - set("core", webInterface.core) + set("core", core) set("request", request) set("post", this@render) set("currentSone", currentSone) - set("localSones", webInterface.core.localSones) + set("localSones", core.localSones) }.let { postTemplate.render(it) } }