X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FUnbookmarkAjaxPage.kt;h=bc61b21c4c9e3972a8c87d32dabc1fd15a4a8ad9;hb=03cec6a6772c2d836d94864adddaf544cbe9d72f;hp=11b3bbff97a313a693cdb2cbceb9d3c6e771b8d6;hpb=85b7420f3492af4e5591f62ad673309a76de7e04;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnbookmarkAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnbookmarkAjaxPage.kt index 11b3bbf..bc61b21 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnbookmarkAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/UnbookmarkAjaxPage.kt @@ -1,17 +1,17 @@ package net.pterodactylus.sone.web.ajax -import net.pterodactylus.sone.utils.also -import net.pterodactylus.sone.utils.let import net.pterodactylus.sone.utils.parameters import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest +import net.pterodactylus.sone.web.page.* +import javax.inject.Inject /** * AJAX page that lets the user unbookmark a post. */ -class UnbookmarkAjaxPage(webInterface: WebInterface) : JsonPage("unbookmark.ajax", webInterface) { +@ToadletPath("unbookmark.ajax") +class UnbookmarkAjaxPage @Inject constructor(webInterface: WebInterface) : JsonPage(webInterface) { - override fun requiresLogin() = false + override val requiresLogin = false override fun createJsonObject(request: FreenetRequest) = request.parameters["post"]