X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FBookmarkPage.kt;h=c03a299a298078a7491b2cf3ea0dc27d7d10fb67;hp=70db67d34b50f2d6b9e83b02dfb63728a12c2747;hb=HEAD;hpb=a76956e389fcfe6282ad4ca7156bbf76327bb0c0 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarkPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarkPage.kt index 70db67d..c03a299 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarkPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/BookmarkPage.kt @@ -10,8 +10,9 @@ import javax.inject.* /** * Page that lets the user bookmark a post. */ +@ToadletPath("bookmark.html") class BookmarkPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) - : SoneTemplatePage("bookmark.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.Bookmark.Title") { + : SoneTemplatePage(webInterface, loaders, templateRenderer, pageTitleKey = "Page.Bookmark.Title") { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) { if (soneRequest.isPOST) { @@ -20,7 +21,7 @@ class BookmarkPage @Inject constructor(webInterface: WebInterface, loaders: Load soneRequest.core.getPost(postId)?.let { soneRequest.core.bookmarkPost(it) } - throw RedirectException(returnPage) + redirectTo(returnPage) } }