Fixed controllers parameters names and number

This commit is contained in:
paolo
2016-05-19 15:51:15 +02:00
parent 674e832392
commit 32acc8a414
84 changed files with 415 additions and 360 deletions
@@ -33,11 +33,11 @@ class Zweck extends APIv1_Controller
*/
public function getZweck()
{
$zweckID = $this->get('zweck_id');
$zweck_code = $this->get('zweck_code');
if(isset($zweckID))
if(isset($zweck_code))
{
$result = $this->ZweckModel->load($zweckID);
$result = $this->ZweckModel->load($zweck_code);
$this->response($result, REST_Controller::HTTP_OK);
}
@@ -54,9 +54,9 @@ class Zweck extends APIv1_Controller
{
if($this->_validate($this->post()))
{
if(isset($this->post()['zweck_id']))
if(isset($this->post()['zweck_code']))
{
$result = $this->ZweckModel->update($this->post()['zweck_id'], $this->post());
$result = $this->ZweckModel->update($this->post()['zweck_code'], $this->post());
}
else
{