🔀 Merge “release/v81” into “master”
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / DismissNotificationPage.kt
index 47c2df6..cd348e7 100644 (file)
@@ -11,13 +11,13 @@ import javax.inject.*
  */
 @ToadletPath("dismissNotification.html")
 class DismissNotificationPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
-               SoneTemplatePage("dismissNotification.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.DismissNotification.Title") {
+               SoneTemplatePage(webInterface, loaders, templateRenderer, pageTitleKey = "Page.DismissNotification.Title") {
 
        override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) {
                val returnPage = soneRequest.httpRequest.getPartAsStringFailsafe("returnPage", 256)
                val notificationId = soneRequest.httpRequest.getPartAsStringFailsafe("notification", 36)
                soneRequest.webInterface.getNotification(notificationId).orNull()?.takeIf { it.isDismissable }?.dismiss()
-               throw RedirectException(returnPage)
+               redirectTo(returnPage)
        }
 
 }