✨ Use @ToadletPath for JSON pages, too
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / ajax / GetLikesAjaxPage.kt
index f0b0012..1175b2b 100644 (file)
@@ -6,15 +6,15 @@ import net.pterodactylus.sone.utils.jsonArray
 import net.pterodactylus.sone.utils.jsonObject
 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 retrieves the number of “likes” a [net.pterodactylus.sone.data.Post]
  * or [net.pterodactylus.sone.data.PostReply] has.
  */
-class GetLikesAjaxPage @Inject constructor(webInterface: WebInterface) :
-               JsonPage("getLikes.ajax", webInterface) {
+@ToadletPath("getLikes.ajax")
+class GetLikesAjaxPage @Inject constructor(webInterface: WebInterface) : JsonPage(webInterface) {
 
        override val needsFormPassword = false