1
0
Aneurin Barker Snook 1 жил өмнө
parent
commit
b880b9c93c
1 өөрчлөгдсөн 5 нэмэгдсэн , 0 устгасан
  1. 5 0
      src/task/api.ts

+ 5 - 0
src/task/api.ts

@@ -143,6 +143,7 @@ export function moveTask({ model }: Context): AuthRequestHandler {
       if (!task) return sendNotFound(res, next)
       if (!req.account._id.equals(task._account)) return sendForbidden(res, next)
 
+      // Update task
       const result = await model.task.move(task._id, position)
 
       // Send output
@@ -217,6 +218,10 @@ export function searchTasks({ model }: Context): AuthRequestHandler {
   }
 }
 
+/**
+ * Toggle task done flag.
+ * If the task is not done, it will become done, and vice versa.
+ */
 export function toggleTaskDone({ model }: Context): AuthRequestHandler {
   type ResponseData = {
     task: WithId<Task>