refactor: add typesafety to TaskContext

This commit is contained in:
Elian Doran
2025-09-13 13:44:23 +03:00
parent 777d5ab3b7
commit 9c8b0611ea
21 changed files with 111 additions and 75 deletions

View File

@@ -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 {