Persistance: Note can now be put in the trash

This commit is contained in:
2020-08-17 18:51:33 +02:00
parent 4e2fe463e0
commit 15de81394c
8 changed files with 120 additions and 34 deletions
@@ -38,7 +38,10 @@ class NoteService(
}
fun find(userId: Int, uuid: UUID) = noteRepository.find(userId, uuid)
fun delete(userId: Int, uuid: UUID) = noteRepository.delete(userId, uuid)
fun trash(userId: Int, uuid: UUID) = noteRepository.delete(userId, uuid, permanent = false)
fun restore(userId: Int, uuid: UUID) = noteRepository.restore(userId, uuid)
fun delete(userId: Int, uuid: UUID) = noteRepository.delete(userId, uuid, permanent = true)
}
data class PaginatedNotes(val pages: Int, val notes: List<PersistedNoteMetadata>)