diff --git a/application/controllers/api/frontend/v1/detailheader/DetailHeader.php b/application/controllers/api/frontend/v1/detailheader/DetailHeader.php deleted file mode 100644 index be9fad27a..000000000 --- a/application/controllers/api/frontend/v1/detailheader/DetailHeader.php +++ /dev/null @@ -1,30 +0,0 @@ - ['admin:r', 'assistenz:r'], - ]); - } - - //------------------------------------------------------------------------------------------------------------------ - // Public methods - - public function getSemesterStati($prestudent_id) - { - $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); - - $result = $this->PrestudentstatusModel->getAllPrestudentstatiWithStudiensemester($prestudent_id); - - $data = $this->getDataOrTerminateWithError($result); - - $this->terminateWithSuccess($data); - } - -} diff --git a/application/controllers/api/frontend/v1/detailheader/Detailheader.php b/application/controllers/api/frontend/v1/detailheader/Detailheader.php index ada10c5b6..e35885efa 100644 --- a/application/controllers/api/frontend/v1/detailheader/Detailheader.php +++ b/application/controllers/api/frontend/v1/detailheader/Detailheader.php @@ -12,6 +12,7 @@ class Detailheader extends FHCAPI_Controller 'getHeader' => ['vertrag/mitarbeiter:r'], 'getPersonAbteilung' => ['vertrag/mitarbeiter:r'], 'getLeitungOrg' => ['vertrag/mitarbeiter:r'], + 'getSemesterStati' => ['admin:r', 'assistenz:r'] ]); } @@ -48,6 +49,17 @@ class Detailheader extends FHCAPI_Controller $this->terminateWithSuccess(current($data)); } + public function getSemesterStati($prestudent_id) + { + $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); + + $result = $this->PrestudentstatusModel->getAllPrestudentstatiWithStudiensemester($prestudent_id); + + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); + } + } diff --git a/public/js/api/factory/detailHeader.js b/public/js/api/factory/detailHeader.js index 4b40d0c7f..02a371f15 100644 --- a/public/js/api/factory/detailHeader.js +++ b/public/js/api/factory/detailHeader.js @@ -37,7 +37,7 @@ export default { getSemesterStati(prestudent_id){ return { method: 'get', - url: 'api/frontend/v1/detailheader/DetailHeader/getSemesterStati/' + prestudent_id, + url: 'api/frontend/v1/detailheader/detailheader/getSemesterStati/' + prestudent_id, }; }, } \ No newline at end of file