override val requiresLogin = false
override fun createJsonObject(request: FreenetRequest) =
- getCurrentSone(request.toadletContext, false).let { currentSone ->
+ getCurrentSone(request.toadletContext).let { currentSone ->
webInterface.getNotifications(currentSone)
.sortedBy(Notification::getCreatedTime)
.let { notifications ->
}
override fun createJsonObject(request: FreenetRequest) =
- getCurrentSone(request.toadletContext, false).let { currentSone ->
+ getCurrentSone(request.toadletContext).let { currentSone ->
createSuccessJsonObject().apply {
this["loggedIn"] = currentSone != null
this["options"] = currentSone?.options?.toJsonOptions() ?: jsonObject {}
protected fun createErrorJsonObject(error: String) =
JsonErrorReturnObject(error)
- protected fun getCurrentSone(toadletContext: ToadletContext, createSession: Boolean = true) =
+ protected fun getCurrentSone(toadletContext: ToadletContext) =
sessionProvider.getCurrentSone(toadletContext)
override fun handleRequest(request: FreenetRequest, response: Response): Response {