mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
add endpoint for fetching all study plans
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user