/**
* Page that lets the user like [net.pterodactylus.sone.data.Post]s and [net.pterodactylus.sone.data.Reply]s.
*/
+@ToadletPath("like.html")
class LikePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
- LoggedInPage("like.html", "Page.Like.Title", webInterface, loaders, templateRenderer) {
+ LoggedInPage("Page.Like.Title", webInterface, loaders, templateRenderer) {
override fun handleRequest(soneRequest: SoneRequest, currentSone: Sone, templateContext: TemplateContext) {
if (soneRequest.isPOST) {
"reply" -> currentSone.addLikedReplyId(soneRequest.parameters["reply", 36]!!)
}
}
- throw RedirectException(soneRequest.parameters["returnPage", 256]!!)
+ redirectTo(soneRequest.parameters["returnPage", 256]!!)
}
}