Show deleted notes count

This commit is contained in:
2020-08-19 00:16:00 +02:00
parent a98d6e8e64
commit 8ccd7f6058
3 changed files with 5 additions and 2 deletions
@@ -48,7 +48,8 @@ class NoteController(
val currentPage = request.query("page")?.toIntOrNull()?.let(::abs) ?: 1
val tag = request.query("tag")
val (pages, notes) = noteService.paginatedNotes(jwtPayload.userId, currentPage, tag = tag)
return Response(OK).html(view.notes(jwtPayload, notes, currentPage, pages, tag = tag))
val deletedCount = noteService.countDeleted(jwtPayload.userId)
return Response(OK).html(view.notes(jwtPayload, notes, currentPage, pages, deletedCount, tag = tag))
}
fun note(request: Request, jwtPayload: JwtPayload): Response {