From 5e6290cda4bee599eda3a096bab6461ab21bcd66 Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Tue, 26 Apr 2022 14:40:32 +0800 Subject: [PATCH] * Fix api for chartdata. --- api/v1/entries/execution.php | 4 ++++ api/v1/entries/stories.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/v1/entries/execution.php b/api/v1/entries/execution.php index a328cb12b3..fcd380534b 100644 --- a/api/v1/entries/execution.php +++ b/api/v1/entries/execution.php @@ -99,6 +99,10 @@ class executionEntry extends Entry $dynamics = $data->data->dynamics; $execution->dynamics = $this->loadModel('action')->processDynamicForAPI($dynamics); break; + case 'chartdata': + list($dateList, $interval) = $this->loadModel('execution')->getDateList($execution->begin, $execution->end, 'noweekend', '0', 'Y-m-d'); + $execution->chartData = $this->execution->buildBurnData($executionID, $dateList, 'noweekend', 'left'); + break; } } diff --git a/api/v1/entries/stories.php b/api/v1/entries/stories.php index fa64edb6c2..2ca9ac9340 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', '100'), $this->param('page', 1)); $data = $this->getData(); if(!$data or !isset($data->status)) return $this->sendError(400, 'error');