diff --git a/application/controllers/api/v1/crm/Prestudent.php b/application/controllers/api/v1/crm/Prestudent.php index c41045baf..11d24204a 100644 --- a/application/controllers/api/v1/crm/Prestudent.php +++ b/application/controllers/api/v1/crm/Prestudent.php @@ -90,6 +90,23 @@ class Prestudent extends APIv1_Controller } } + /** + * @return void + */ + public function deletePrestudent() + { + if ($this->_validate($this->delete())) + { + $result = $this->PrestudentModel->delete($this->delete()["prestudent_id"]); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + /** * @return void */ @@ -152,4 +169,4 @@ class Prestudent extends APIv1_Controller return true; } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php index 7d5bc84f9..395585879 100644 --- a/application/controllers/api/v1/crm/Prestudentstatus.php +++ b/application/controllers/api/v1/crm/Prestudentstatus.php @@ -104,8 +104,33 @@ class Prestudentstatus extends APIv1_Controller } } + /** + * @return void + */ + public function deletePrestudentstatus() + { + $prestudentstatus = $this->_parseData($this->delete()); + + if ($this->_validate($prestudentstatus)) + { + $pksArray = array($prestudentstatus['ausbildungssemester'], + $prestudentstatus['studiensemester_kurzbz'], + $prestudentstatus['status_kurzbz'], + $prestudentstatus['prestudent_id'] + ); + + $result = $this->PrestudentstatusModel->delete($pksArray); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + private function _validate($prestudentstatus = null) { return true; } -} \ No newline at end of file +}