add endpoint for fetching all degree programes

This commit is contained in:
Ivymaster
2026-04-14 16:17:17 +02:00
parent 59d531ed0f
commit d8f5c412c5
@@ -26,7 +26,8 @@ class Studgang extends FHCAPI_Controller
public function __construct()
{
parent::__construct([
'getStudiengangInfo'=> self::PERM_LOGGED,
'getAllStudiengange'=> self::PERM_LOGGED,
'getAllDegreePrograms'=> self::PERM_LOGGED,
]);
@@ -43,6 +44,14 @@ class Studgang extends FHCAPI_Controller
//------------------------------------------------------------------------------------------------------------------
// Public methods
public function getAllDegreePrograms()
{
$this->load->model('organisation/Studiengang_model', "StudiengangModel");
$class_schedule_res = $this->StudiengangModel->load();
$class_schedule_res = $this->getDataOrTerminateWithError($class_schedule_res);
$this->terminateWithSuccess($class_schedule_res);
}
public function getStudiengangInfo(){
$isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID());
$isMitarbeiter = $this->getDataOrTerminateWithError($isMitarbeiter);