undelete note WIP

This commit is contained in:
zadam
2020-01-03 13:14:43 +01:00
parent c1d0a1e07b
commit 14f3c783f2
7 changed files with 300 additions and 130 deletions

View File

@@ -71,6 +71,16 @@ async function deleteNote(req) {
}
}
async function undeleteNote(req) {
const note = await repository.getNote(req.params.noteId);
const taskContext = TaskContext.getInstance(utils.randomString(), 'undelete-notes');
await noteService.undeleteNote(note, note.deleteId, taskContext);
await taskContext.taskSucceeded();
}
async function sortNotes(req) {
const noteId = req.params.noteId;
@@ -172,6 +182,7 @@ module.exports = {
getNote,
updateNote,
deleteNote,
undeleteNote,
createNote,
sortNotes,
protectSubtree,