* Modify build create api.

This commit is contained in:
songchenxuan
2023-07-05 11:19:47 +08:00
parent 0b1e083e4c
commit efabc29a71
+7 -2
View File
@@ -50,8 +50,13 @@ class buildsEntry extends entry
{ {
if(!$projectID) $projectID = $this->param('project', 0); if(!$projectID) $projectID = $this->param('project', 0);
$project = $this->loadModel('project')->getByID($projectID); if($projectID)
if(!$project) return $this->send404(); {
$project = $this->loadModel('project')->getByID($projectID);
if(!$project) return $this->sendError(404, 'Error project id');
$this->setPost('project', $projectID);
}
$fields = 'execution,product,name,builder,date,scmPath,filePath,desc,branch'; $fields = 'execution,product,name,builder,date,scmPath,filePath,desc,branch';
$this->batchSetPost($fields); $this->batchSetPost($fields);