From 5daa800c2c1e2973727fb2df91d1f52ec9d807ef Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Thu, 28 Apr 2022 09:41:35 +0800 Subject: [PATCH 1/2] * Fix api for limit. --- api/v1/entries/project.php | 3 +++ api/v1/entries/stories.php | 2 +- config/routes.php | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/v1/entries/project.php b/api/v1/entries/project.php index 970823db25..59e4e50e7d 100644 --- a/api/v1/entries/project.php +++ b/api/v1/entries/project.php @@ -80,6 +80,9 @@ class projectEntry extends entry $actions = $data->data->actions; $project->actions = $this->loadModel('action')->processActionForAPI($actions, (array)$data->data->users, $this->lang->project); break; + case "builds": + $project->builds = $this->loadModel('build')->getBuildPairs($this->param('productID', '0'), 'all', 'noempty,noterminate,nodone,withbranch', $projectID, 'project'); + break; case "dynamics": $dynamics = $data->data->dynamics; $project->dynamics = $this->loadModel('action')->processDynamicForAPI($dynamics); diff --git a/api/v1/entries/stories.php b/api/v1/entries/stories.php index fa64edb6c2..d1bc48d5b6 100644 --- a/api/v1/entries/stories.php +++ b/api/v1/entries/stories.php @@ -24,7 +24,7 @@ class storiesEntry extends entry if(!$productID) return $this->sendError(400, 'Need product id.'); $control = $this->loadController('product', 'browse'); - $control->browse($productID, $this->param('branch', ''), $this->param('status', 'unclosed'), 0, $this->param('type', 'story'), $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1)); + $control->browse($productID, $this->param('branch', ''), $this->param('status', 'unclosed'), 0, $this->param('type', 'story'), $this->param('order', 'id_desc'), 0, $this->param('limit', 500), $this->param('page', 1)); $data = $this->getData(); if(!$data or !isset($data->status)) return $this->sendError(400, 'error'); diff --git a/config/routes.php b/config/routes.php index 23156d702d..e1d77552bc 100644 --- a/config/routes.php +++ b/config/routes.php @@ -55,8 +55,6 @@ $routes['/stories/:id/child'] = 'storyChild'; $routes['/stories/:id/recall'] = 'storyRecall'; $routes['/stories/:id/review'] = 'storyReview'; -$routes['/module/:id/stories'] = 'moduleStories'; - $routes['/products/:id/bugs'] = 'bugs'; $routes['/projects/:id/bugs'] = 'projectBugs'; $routes['/executions/:id/bugs'] = 'executionBugs'; From aae6c0c3782d977c639c6ed08148a5649b0b7e13 Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Thu, 28 Apr 2022 09:55:35 +0800 Subject: [PATCH 2/2] * Delete api. --- api/v1/entries/project.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/v1/entries/project.php b/api/v1/entries/project.php index 59e4e50e7d..970823db25 100644 --- a/api/v1/entries/project.php +++ b/api/v1/entries/project.php @@ -80,9 +80,6 @@ class projectEntry extends entry $actions = $data->data->actions; $project->actions = $this->loadModel('action')->processActionForAPI($actions, (array)$data->data->users, $this->lang->project); break; - case "builds": - $project->builds = $this->loadModel('build')->getBuildPairs($this->param('productID', '0'), 'all', 'noempty,noterminate,nodone,withbranch', $projectID, 'project'); - break; case "dynamics": $dynamics = $data->data->dynamics; $project->dynamics = $this->loadModel('action')->processDynamicForAPI($dynamics);