loadController('task', 'view'); $control->view($taskID); $data = $this->getData(); $task = $data->data->task; $this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time')); } public function put($taskID) { $oldTask = $this->loadModel('task')->getByID($taskID); /* Set $_POST variables. */ $fields = 'name,type,assignedTo,estimate,left,consumed,story,parent,execution,module,closedReason,status'; $this->batchSetPost($fields, $oldTask); $control = $this->loadController('task', 'edit'); $control->edit($taskID); $this->getData(); $task = $this->task->getByID($taskID); $this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time')); } public function delete($taskID) { $control = $this->loadController('task', 'delete'); $control->delete(0, $taskID, 'true'); $this->getData(); $this->sendSuccess(200, 'success'); } }