mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-03 11:59:29 +00:00
stundenplan/lvplan revert changes to legacy api endpoints
This commit is contained in:
+12
-12
@@ -14,16 +14,16 @@
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class LvPlan extends API_Controller
|
||||
class Stundenplan extends API_Controller
|
||||
{
|
||||
/**
|
||||
* LvPlan API constructor.
|
||||
* Stundenplan API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(array('Stundenplan' => 'basis/stundenplan:rw'));
|
||||
// Load model LvPlanModel
|
||||
$this->load->model('ressource/stundenplan_model', 'LvPlanModel');
|
||||
// Load model StundenplanModel
|
||||
$this->load->model('ressource/stundenplan_model', 'StundenplanModel');
|
||||
|
||||
|
||||
}
|
||||
@@ -31,13 +31,13 @@ class LvPlan extends API_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getLvPlan()
|
||||
public function getStundenplan()
|
||||
{
|
||||
$lvPlanID = $this->get('stundenplan_id');
|
||||
$stundenplanID = $this->get('stundenplan_id');
|
||||
|
||||
if (isset($lvPlanID))
|
||||
if (isset($stundenplanID))
|
||||
{
|
||||
$result = $this->LvPlanModel->load($lvPlanID);
|
||||
$result = $this->StundenplanModel->load($stundenplanID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
@@ -50,17 +50,17 @@ class LvPlan extends API_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postLvPlan()
|
||||
public function postStundenplan()
|
||||
{
|
||||
if ($this->_validate($this->post()))
|
||||
{
|
||||
if (isset($this->post()['stundenplan_id']))
|
||||
{
|
||||
$result = $this->LvPlanModel->update($this->post()['stundenplan_id'], $this->post());
|
||||
$result = $this->StundenplanModel->update($this->post()['stundenplan_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->LvPlanModel->insert($this->post());
|
||||
$result = $this->StundenplanModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
@@ -71,7 +71,7 @@ class LvPlan extends API_Controller
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($lvplan = NULL)
|
||||
private function _validate($stundenplan = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
+12
-12
@@ -14,16 +14,16 @@
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class LvPlandev extends API_Controller
|
||||
class Stundenplandev extends API_Controller
|
||||
{
|
||||
/**
|
||||
* LvPlandev API constructor.
|
||||
* Stundenplandev API constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(array('Stundenplandev' => 'basis/stundenplandev:rw'));
|
||||
// Load model LvPlandevModel
|
||||
$this->load->model('ressource/stundenplandev_model', 'LvPlandevModel');
|
||||
// Load model StundenplandevModel
|
||||
$this->load->model('ressource/stundenplandev_model', 'StundenplandevModel');
|
||||
|
||||
|
||||
}
|
||||
@@ -31,13 +31,13 @@ class LvPlandev extends API_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getLvPlandev()
|
||||
public function getStundenplandev()
|
||||
{
|
||||
$lvplandevID = $this->get('stundenplandev_id');
|
||||
$stundenplandevID = $this->get('stundenplandev_id');
|
||||
|
||||
if (isset($lvplandevID))
|
||||
if (isset($stundenplandevID))
|
||||
{
|
||||
$result = $this->LvPlandevModel->load($lvplandevID);
|
||||
$result = $this->StundenplandevModel->load($stundenplandevID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
@@ -50,17 +50,17 @@ class LvPlandev extends API_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postLvPlandev()
|
||||
public function postStundenplandev()
|
||||
{
|
||||
if ($this->_validate($this->post()))
|
||||
{
|
||||
if (isset($this->post()['stundenplandev_id']))
|
||||
{
|
||||
$result = $this->LvPlandevModel->update($this->post()['stundenplandev_id'], $this->post());
|
||||
$result = $this->StundenplandevModel->update($this->post()['stundenplandev_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->LvPlandevModel->insert($this->post());
|
||||
$result = $this->StundenplandevModel->insert($this->post());
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
@@ -71,7 +71,7 @@ class LvPlandev extends API_Controller
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($lvplandev = NULL)
|
||||
private function _validate($stundenplandev = NULL)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user