* Refactor cancal method.

This commit is contained in:
tianshujie
2023-08-18 10:28:02 +08:00
parent 62a97977f0
commit 37e0b24728
2 changed files with 7 additions and 6 deletions
+5 -5
View File
@@ -1173,17 +1173,17 @@ class taskModel extends model
}
/**
* 取消一个任务。
* Cancel a task.
*
* @param object $task
* @param string $extra
*
* @param object $task
* @param string $extra
* @access public
* @return array
* @return bool
*/
public function cancel(object $task, string $extra = ''): bool
{
$oldTask = $this->getById($task->id);
$oldTask = $this->getByID($task->id);
$this->dao->update(TABLE_TASK)->data($task)
->autoCheck()
->checkFlow()