From d8f5c412c5bfb2d8d6b2f2b1a6e242676488500a Mon Sep 17 00:00:00 2001 From: Ivymaster Date: Tue, 14 Apr 2026 16:17:17 +0200 Subject: [PATCH] add endpoint for fetching all degree programes --- application/controllers/api/frontend/v1/Studgang.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/application/controllers/api/frontend/v1/Studgang.php b/application/controllers/api/frontend/v1/Studgang.php index 82aebb666..c5f908cdf 100644 --- a/application/controllers/api/frontend/v1/Studgang.php +++ b/application/controllers/api/frontend/v1/Studgang.php @@ -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);