From 9b34631135f29480dda3ed2df463fbb5aab7c9e4 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 12 Mar 2017 21:36:52 -0400 Subject: Simplify dashboard to use new tasks list view --- app/Api/Procedure/MeProcedure.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'app/Api/Procedure/MeProcedure.php') 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() -- cgit v1.2.3