add endpoint for fetching all study plans

This commit is contained in:
Ivymaster
2026-04-14 16:17:38 +02:00
parent d8f5c412c5
commit fe68d46831
@@ -20,10 +20,19 @@ class Studienplan extends FHCAPI_Controller
{
// TODO(chris): access!
parent::__construct([
'getAllStudyPlans' => self::PERM_LOGGED,
'getBySemester' => self::PERM_LOGGED
]);
}
public function getAllStudyPlans()
{
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
$result = $this->StudienplanModel->load();
$studien_plan_result = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($studien_plan_result);
}
public function getBySemester()
{
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');