mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Added _parseData to method postPrestudent of controller Prestudent
This commit is contained in:
@@ -71,15 +71,17 @@ class Prestudent extends APIv1_Controller
|
||||
*/
|
||||
public function postPrestudent()
|
||||
{
|
||||
if ($this->_validate($this->post()))
|
||||
$prestudent = $this->_parseData($this->post());
|
||||
|
||||
if ($this->_validate($prestudent))
|
||||
{
|
||||
if (isset($this->post()["prestudent_id"]))
|
||||
if (isset($prestudent["prestudent_id"]))
|
||||
{
|
||||
$result = $this->PrestudentModel->update($this->post()["prestudent_id"], $this->post());
|
||||
$result = $this->PrestudentModel->update($prestudent["prestudent_id"], $prestudent);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->PrestudentModel->insert($this->post());
|
||||
$result = $this->PrestudentModel->insert($prestudent);
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
|
||||
Reference in New Issue
Block a user