* Fix missing requireFields error.

This commit is contained in:
鲁飞
2022-11-07 09:14:12 +00:00
committed by 朱金勇
parent 0d9ca308b0
commit b8619da3a6
25 changed files with 28 additions and 27 deletions
+1 -1
View File
@@ -122,6 +122,6 @@ class bugEntry extends entry
$control->delete($bugID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+2 -2
View File
@@ -29,7 +29,7 @@ class buildEntry extends entry
/* Exception handling. */
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$this->sendError(400, 'error');
return $this->sendError(400, 'error');
}
/**
@@ -71,6 +71,6 @@ class buildEntry extends entry
$control->delete($buildID, 'true');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -2
View File
@@ -40,8 +40,7 @@ class configEntry extends baseEntry
$config['value'] = $this->config->systemMode;
break;
default:
$this->sendError(400, 'No configuration.');
return;
return $this->sendError(400, 'No configuration.');
}
return $this->send(200, $config);
+1 -1
View File
@@ -65,6 +65,6 @@ class departmentEntry extends entry
$data = $this->getData();
if(isset($data->status) and $data->status == 'fail') return $this->sendError(400, $data->message);
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+2 -2
View File
@@ -67,7 +67,7 @@ class docEntry extends entry
$this->getData();
$story = $this->story->getByID($storyID);
$this->sendSuccess(200, $this->format($story, 'openedDate:time,assignedDate:time,reviewedDate:time,lastEditedDate:time,closedDate:time,deleted:bool'));
return $this->sendSuccess(200, $this->format($story, 'openedDate:time,assignedDate:time,reviewedDate:time,lastEditedDate:time,closedDate:time,deleted:bool'));
}
/**
@@ -83,6 +83,6 @@ class docEntry extends entry
$control->delete($storyID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -152,6 +152,6 @@ class executionEntry extends entry
$control->delete($executionID, 'true');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -79,7 +79,7 @@ class feedbackEntry extends entry
$control->delete($feedbackID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -74,6 +74,6 @@ class issueEntry extends entry
$control->delete($issueID, 'true');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -136,6 +136,6 @@ class productEntry extends entry
$control->delete($productID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -87,6 +87,6 @@ class productplanEntry extends entry
$control->delete($planID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -65,6 +65,6 @@ class programEntry extends entry
$data = $this->getData();
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -139,6 +139,6 @@ class projectEntry extends entry
$control->delete($projectID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+2 -2
View File
@@ -54,7 +54,7 @@ class releaseEntry extends entry
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
$release = $this->release->getByID($releaseID);
$this->sendSuccess(200, $this->format($release, 'date:date,deleted:bool'));
return $this->sendSuccess(200, $this->format($release, 'date:date,deleted:bool'));
}
/**
@@ -70,6 +70,6 @@ class releaseEntry extends entry
$control->delete($releaseID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -70,6 +70,6 @@ class riskEntry extends entry
$control->delete($riskID, 'true');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -124,6 +124,6 @@ class storyEntry extends entry
$control->delete($storyID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ class storyRecallEntry extends entry
$control->recall($storyID);
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -130,6 +130,6 @@ class taskEntry extends entry
$control->delete(0, $taskID, 'true');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1
View File
@@ -38,6 +38,7 @@ class taskFinishEntry extends entry
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
if(isset($data->result) and $data->result == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getByID($taskID);
+1
View File
@@ -32,6 +32,7 @@ class taskStartEntry extends entry
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
if(isset($data->result) and $data->result == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getByID($taskID);
+1 -1
View File
@@ -88,6 +88,6 @@ class testcaseEntry extends entry
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -53,6 +53,6 @@ class testsuiteEntry extends entry
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -51,6 +51,6 @@ class testtaskEntry extends entry
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -77,6 +77,6 @@ class todoEntry extends entry
$control->delete($todoID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -445,6 +445,6 @@ class userEntry extends entry
$control->delete($userID);
$this->getData();
$this->sendSuccess(200, 'success');
return $this->sendSuccess(200, 'success');
}
}
+1 -1
View File
@@ -465,7 +465,7 @@ class baseEntry
{
$module = $this->app->moduleName;
$name = isset($this->app->lang->$module->$field) ? $this->app->lang->$module->$field : $field;
$this->sendError(400, sprintf($this->app->lang->error->notempty, $name));
throw EndResponseException::create($this->sendError(400, sprintf($this->app->lang->error->notempty, $name)));
}
}
}