summaryrefslogtreecommitdiff
path: root/app/Api
diff options
context:
space:
mode:
Diffstat (limited to 'app/Api')
-rw-r--r--app/Api/Procedure/MeProcedure.php15
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()