Move task creation to a seperate class
This commit is contained in:
@@ -33,6 +33,7 @@ use Model\LastLogin;
|
||||
* @property \Model\ProjectAnalytic $projectAnalytic
|
||||
* @property \Model\SubTask $subTask
|
||||
* @property \Model\Task $task
|
||||
* @property \Model\TaskCreation $taskCreation
|
||||
* @property \Model\TaskHistory $taskHistory
|
||||
* @property \Model\TaskExport $taskExport
|
||||
* @property \Model\TaskFinder $taskFinder
|
||||
|
||||
@@ -127,7 +127,7 @@ class Task extends Base
|
||||
|
||||
if ($valid) {
|
||||
|
||||
if ($this->task->create($values)) {
|
||||
if ($this->taskCreation->create($values)) {
|
||||
$this->session->flash(t('Task created successfully.'));
|
||||
|
||||
if (isset($values['another_task']) && $values['another_task'] == 1) {
|
||||
|
||||
@@ -35,7 +35,7 @@ class Webhook extends Base
|
||||
|
||||
list($valid,) = $this->taskValidator->validateCreation($values);
|
||||
|
||||
if ($valid && $this->task->create($values)) {
|
||||
if ($valid && $this->taskCreation->create($values)) {
|
||||
$this->response->text('OK');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user