fix undelete

This commit is contained in:
zadam
2021-05-09 11:12:53 +02:00
parent 9afea492db
commit ef0941479c
8 changed files with 44 additions and 27 deletions

View File

@@ -1,7 +1,7 @@
"use strict";
const imageService = require('../../services/image');
const repository = require('../../services/repository');
const becca = require('../../services/becca/becca');
const RESOURCE_DIR = require('../../services/resource_dir').RESOURCE_DIR;
const fs = require('fs');

View File

@@ -81,11 +81,9 @@ function deleteNote(req) {
}
function undeleteNote(req) {
const note = becca.getNote(req.params.noteId);
const taskContext = TaskContext.getInstance(utils.randomString(10), 'undeleteNotes');
noteService.undeleteNote(note, note.deleteId, taskContext);
noteService.undeleteNote(req.params.noteId, taskContext);
taskContext.taskSucceeded();
}