From 341d5cf8da659ca8c367b44604e92b078fb9f9d1 Mon Sep 17 00:00:00 2001 From: paolo Date: Wed, 29 Jun 2016 16:27:25 +0200 Subject: [PATCH] Changed method getGemeinde of controller Gemeinde, now it returns all data if no parameters are specified. Data are ordered by the field plz. --- application/controllers/api/v1/codex/Gemeinde.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/api/v1/codex/Gemeinde.php b/application/controllers/api/v1/codex/Gemeinde.php index e0bf6dc6c..64aa6a179 100644 --- a/application/controllers/api/v1/codex/Gemeinde.php +++ b/application/controllers/api/v1/codex/Gemeinde.php @@ -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); } /**