* Fix missing requireFields error.
This commit is contained in:
@@ -122,6 +122,6 @@ class bugEntry extends entry
|
||||
$control->delete($bugID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +152,6 @@ class executionEntry extends entry
|
||||
$control->delete($executionID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class feedbackEntry extends entry
|
||||
$control->delete($feedbackID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,6 @@ class issueEntry extends entry
|
||||
$control->delete($issueID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +136,6 @@ class productEntry extends entry
|
||||
$control->delete($productID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,6 @@ class productplanEntry extends entry
|
||||
$control->delete($planID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +139,6 @@ class projectEntry extends entry
|
||||
$control->delete($projectID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,6 @@ class riskEntry extends entry
|
||||
$control->delete($riskID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +124,6 @@ class storyEntry extends entry
|
||||
$control->delete($storyID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class storyRecallEntry extends entry
|
||||
$control->recall($storyID);
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -130,6 +130,6 @@ class taskEntry extends entry
|
||||
$control->delete(0, $taskID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -88,6 +88,6 @@ class testcaseEntry extends entry
|
||||
|
||||
$this->getData();
|
||||
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,6 @@ class testsuiteEntry extends entry
|
||||
|
||||
$this->getData();
|
||||
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,6 @@ class testtaskEntry extends entry
|
||||
|
||||
$this->getData();
|
||||
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,6 @@ class todoEntry extends entry
|
||||
$control->delete($todoID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,6 +445,6 @@ class userEntry extends entry
|
||||
$control->delete($userID);
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user