X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FViewSonePage.kt;h=e2de3e4edbb8fb1bbe7ce8351af957e9a982c268;hp=38868e2782496ce75ea4d70b1be894b200d9bf62;hb=110a933c2724aba6a604fc5eed6372ff1e1e6144;hpb=e3da46d8947ab8a542a156069b3b24c13fd011df diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt index 38868e2..e2de3e4 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/ViewSonePage.kt @@ -9,7 +9,6 @@ import net.pterodactylus.sone.utils.paginate import net.pterodactylus.sone.utils.parameters import net.pterodactylus.sone.web.WebInterface import net.pterodactylus.sone.web.page.* -import net.pterodactylus.util.template.Template import net.pterodactylus.util.template.TemplateContext import java.net.URI import javax.inject.Inject @@ -17,8 +16,9 @@ import javax.inject.Inject /** * Lets the user browser another Sone. */ -class ViewSonePage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer): - SoneTemplatePage("viewSone.html", webInterface, loaders, template, templateRenderer) { +@TemplatePath("/templates/viewSone.html") +class ViewSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer): + SoneTemplatePage("viewSone.html", webInterface, loaders, templateRenderer) { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) { templateContext["soneId"] = soneRequest.parameters["sone"]