diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-03-12 21:36:52 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-03-12 21:36:52 -0400 |
commit | 9b34631135f29480dda3ed2df463fbb5aab7c9e4 (patch) | |
tree | 46da2f342a440cc699b7aa9c61bd18d0d2ea01f5 /app/Api | |
parent | f6b42eb8024b7db959f6d75118b3de0f96301262 (diff) |
Simplify dashboard to use new tasks list view
Diffstat (limited to 'app/Api')
-rw-r--r-- | app/Api/Procedure/MeProcedure.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/app/Api/Procedure/MeProcedure.php b/app/Api/Procedure/MeProcedure.php index 71d5555b..3ba73fdd 100644 --- a/app/Api/Procedure/MeProcedure.php +++ b/app/Api/Procedure/MeProcedure.php @@ -2,8 +2,6 @@ namespace Kanboard\Api\Procedure; -use Kanboard\Model\SubtaskModel; - /** * Me API controller * @@ -19,15 +17,12 @@ class MeProcedure extends BaseProcedure public function getMyDashboard() { - $user_id = $this->userSession->getId(); - $projects = $this->projectModel->getQueryColumnStats($this->projectPermissionModel->getActiveProjectIds($user_id))->findAll(); - $tasks = $this->taskFinderModel->getUserQuery($user_id)->findAll(); + $userId = $this->userSession->getId(); - return array( - 'projects' => $this->formatProjects($projects), - 'tasks' => $this->formatTasks($tasks), - 'subtasks' => $this->subtaskModel->getUserQuery($user_id, array(SubtaskModel::STATUS_TODO, SubtaskModel::STATUS_INPROGRESS))->findAll(), - ); + return $this->taskListSubtaskAssigneeFormatter + ->withQuery($this->taskFinderModel->getUserQuery($userId)) + ->withUserId($userId) + ->format(); } public function getMyActivityStream() |