X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetNotificationsAjaxPage.kt;h=f3b370d78a9f5efd7c14a23ce81f795f5c40115c;hb=7afd66a21244e757b6b49ba96bb3989bc55a2abf;hp=c3ea74cf5512c9eafbc8b1fdb2d2f9bb5dcd5814;hpb=4bf90851f9e7a8f31d4f58f4f74dc46d8e4ddec8;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt index c3ea74c..f3b370d 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt @@ -10,14 +10,16 @@ import net.pterodactylus.sone.web.page.FreenetRequest import net.pterodactylus.util.notify.Notification import net.pterodactylus.util.notify.TemplateNotification import java.io.StringWriter +import javax.inject.Inject /** * AJAX handler to return all current notifications. */ -class GetNotificationsAjaxPage(webInterface: WebInterface) : JsonPage("getNotifications.ajax", webInterface) { +class GetNotificationsAjaxPage @Inject constructor(webInterface: WebInterface) : + JsonPage("getNotifications.ajax", webInterface) { override val needsFormPassword = false - override fun requiresLogin() = false + override val requiresLogin = false override fun createJsonObject(request: FreenetRequest) = getCurrentSone(request.toadletContext, false).let { currentSone ->