X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FViewPostPage.kt;h=763fc997de2e2f97176fb6e7ff76c49e21b40109;hp=910c939d2dcc1fba2d17016c87d00196600d733f;hb=a0e1d37dac7c0dc7ca0317892f301e190fd3157c;hpb=fd32e307db87c617a4c455f592b6e649ec50ae8a diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt index 910c939..763fc99 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewPostPage.kt @@ -8,12 +8,13 @@ import net.pterodactylus.sone.web.page.FreenetRequest import net.pterodactylus.util.template.Template import net.pterodactylus.util.template.TemplateContext import java.net.URI +import javax.inject.Inject /** * This page lets the user view a post and all its replies. */ -class ViewPostPage(template: Template, webInterface: WebInterface): - SoneTemplatePage("viewPost.html", template, "Page.ViewPost.Title", webInterface, false) { +class ViewPostPage @Inject constructor(template: Template, webInterface: WebInterface): + SoneTemplatePage("viewPost.html", webInterface, template, "Page.ViewPost.Title") { override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) { templateContext["post"] = freenetRequest.parameters["post"]?.let(webInterface.core::getPost)