From de16a59a349beacba3c6e4fb09c305b945d65da6 Mon Sep 17 00:00:00 2001 From: velz Date: Wed, 12 Sep 2018 18:35:26 +0530 Subject: [PATCH] TEMPLATE MODIFIED --- .../Template_Management_Controller.php | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/api/application/controllers/Template_Management_Controller.php b/api/application/controllers/Template_Management_Controller.php index 300d1414..33102834 100644 --- a/api/application/controllers/Template_Management_Controller.php +++ b/api/application/controllers/Template_Management_Controller.php @@ -49,7 +49,7 @@ class Template_Management_Controller extends REST_Controller { $template_id = $this->Template_Management_Model->saveRecords($template_name,TEMPLATE); if($template_id != "" || $template_id != null) { - data['dataStatus'] = true; + $data['dataStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; $data['records'] = $template_id; $this->response($data,REST_Controller::HTTP_OK); @@ -68,7 +68,7 @@ class Template_Management_Controller extends REST_Controller { $modified = $this->db->updateRecords($template_name,TEMPLATE,$where_condition_array); if($template_id != "" || $template_id != null) { - data['dataStatus'] = true; + $data['dataStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; $data['records'] = $modified; $this->response($data,REST_Controller::HTTP_OK); @@ -117,7 +117,7 @@ class Template_Management_Controller extends REST_Controller { if($count == count($template_lender_details)) { - data['dataStatus'] = true; + $data['dataStatus'] = true; $data['status'] = REST_Controller::HTTP_OK; $data['records'] = true; $this->response($data,REST_Controller::HTTP_OK); @@ -161,6 +161,21 @@ class Template_Management_Controller extends REST_Controller { } } + if($count == count($template_lender_details)) + { + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = true; + $this->response($data,REST_Controller::HTTP_OK); + } + else + { + $data['dataStatus'] = false; + $data['status'] = REST_Controller::HTTP_NO_CONTENT; + $this->response($data,REST_Controller::HTTP_NO_CONTENT); + + } + }