diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php index 8c415f942..721e6ca8c 100644 --- a/application/controllers/api/v1/crm/Prestudentstatus.php +++ b/application/controllers/api/v1/crm/Prestudentstatus.php @@ -49,6 +49,27 @@ class Prestudentstatus extends APIv1_Controller $this->response(); } } + + /** + * @return void + */ + public function getLastStatus() + { + $prestudent_id = $this->get("prestudent_id"); + $studiensemester_kurzbz = $this->get("studiensemester_kurzbz"); + $status_kurzbz = $this->get("status_kurzbz"); + + if (isset($prestudent_id)) + { + $result = $this->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz, $status_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } /** * @return void