mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
refactor: add typesafety to TaskContext
This commit is contained in:
@@ -236,7 +236,7 @@ function deleteBranch(req: Request) {
|
||||
const eraseNotes = req.query.eraseNotes === "true";
|
||||
const branch = becca.getBranchOrThrow(req.params.branchId);
|
||||
|
||||
const taskContext = TaskContext.getInstance(req.query.taskId as string, "deleteNotes");
|
||||
const taskContext = TaskContext.getInstance(req.query.taskId as string, "deleteNotes", null);
|
||||
|
||||
const deleteId = utils.randomString(10);
|
||||
let noteDeleted;
|
||||
@@ -251,7 +251,7 @@ function deleteBranch(req: Request) {
|
||||
}
|
||||
|
||||
if (last) {
|
||||
taskContext.taskSucceeded();
|
||||
taskContext.taskSucceeded(null);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user