From 06f6d3157967cfbfc6d9c4e3bf28da15dca5d49e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 18 Oct 2021 10:24:28 +0800 Subject: [PATCH] * add my bug data for api. --- api/v1/entries/user.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/v1/entries/user.php b/api/v1/entries/user.php index 3d830aa3ed..8642cff4ee 100644 --- a/api/v1/entries/user.php +++ b/api/v1/entries/user.php @@ -98,6 +98,20 @@ class userEntry extends Entry $info->task['tasks'] = $data->data->tasks; } + break; + case 'bug': + $info->bug = array('total' => 0, 'bugs' => array()); + + $control = $this->loadController('my', 'bug'); + $control->bug($this->param('type', 'assignedTo'), $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1)); + $data = $this->getData(); + + if($data->status == 'success') + { + $info->bug['total'] = $data->data->pager->recTotal; + $info->bug['bugs'] = $data->data->bugs; + } + break; case 'todo': $info->todo = array('total' => 0, 'todos' => array());