* Adjust response of api.

This commit is contained in:
zhujinyong
2021-09-08 10:40:25 +08:00
parent 2cee5fc75e
commit 489a87e0ec
11 changed files with 209 additions and 227 deletions
+1 -1
View File
@@ -674,7 +674,7 @@ class task extends control
$task = $this->task->getById($taskID, true);
if(!$task)
{
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => '404 Not found'));
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
die(js::error($this->lang->notFound) . js::locate('back'));
}
$this->session->project = $task->project;