From e88da56dd7f83c651a49d46104dba7afcc783cc6 Mon Sep 17 00:00:00 2001 From: paolo Date: Wed, 18 May 2016 15:26:37 +0200 Subject: [PATCH] Added method PreinteressentByPersonID to Preinteressent controller --- .../controllers/api/v1/crm/Preinteressent.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/application/controllers/api/v1/crm/Preinteressent.php b/application/controllers/api/v1/crm/Preinteressent.php index fbfa6bb94..aaac2b3e2 100644 --- a/application/controllers/api/v1/crm/Preinteressent.php +++ b/application/controllers/api/v1/crm/Preinteressent.php @@ -46,6 +46,25 @@ class Preinteressent extends APIv1_Controller $this->response(); } } + + /** + * @return void + */ + public function getPreinteressentByPersonID() + { + $person_id = $this->get('person_id'); + + if(isset($person_id)) + { + $result = $this->PreinteressentModel->load(array('person_id' => $person_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } /** * @return void