mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-03 20:09:29 +00:00
Changed method getGemeinde of controller Gemeinde, now it returns all data
if no parameters are specified. Data are ordered by the field plz.
This commit is contained in:
@@ -33,16 +33,16 @@ class Gemeinde extends APIv1_Controller
|
||||
{
|
||||
$gemeindeID = $this->get('gemeinde_id');
|
||||
|
||||
$this->GemeindeModel->addOrder('plz');
|
||||
if (isset($gemeindeID))
|
||||
{
|
||||
$result = $this->GemeindeModel->load($gemeindeID);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
$result = $this->GemeindeModel->load();
|
||||
}
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user