1 package net.pterodactylus.sone.web.ajax
3 import net.pterodactylus.sone.data.Sone
4 import net.pterodactylus.sone.web.WebInterface
5 import net.pterodactylus.sone.web.page.FreenetRequest
8 * Base JSON page for all pages that require the user to be logged in.
10 open class LoggedInJsonPage(webInterface: WebInterface) : JsonPage(webInterface) {
12 final override val requiresLogin = true
14 final override fun createJsonObject(request: FreenetRequest) =
15 createJsonObject(getCurrentSone(request.toadletContext)!!, request)
17 open protected fun createJsonObject(currentSone: Sone, request: FreenetRequest): JsonReturnObject =
18 createErrorJsonObject("not-implemented")