From 3d9108c58da253eb7b140cafcd72c13ca4eb421a Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 23 Jan 2018 15:53:00 +0530 Subject: [PATCH] course details changes done --- .../controllers/Call_Tracking_Controller.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Apollo/api/application/controllers/Call_Tracking_Controller.php b/Apollo/api/application/controllers/Call_Tracking_Controller.php index 9b765e3f..9520db1b 100755 --- a/Apollo/api/application/controllers/Call_Tracking_Controller.php +++ b/Apollo/api/application/controllers/Call_Tracking_Controller.php @@ -42,6 +42,8 @@ class Call_Tracking_Controller extends REST_Controller { $this->methods['getRecentLeadDetails_post']['limit'] = 1000; // 50 requests per hour per user/key $this->methods['getRecentCloseDetails_post']['limit'] = 1000; // 50 requests per hour per user/key $this->methods['getRecentPendingDetails_post']['limit'] = 1000; // 50 requests per hour per user/key + $this->methods['callAsImportantFlag_post']['limit'] = 1000; // 50 requests per hour per user/key + // load the model $this->load->model('Calltracking_model', 'Calltracking_model'); @@ -368,6 +370,32 @@ class Call_Tracking_Controller extends REST_Controller { } + /* + * mark as important for call + * created by kms + * */ + public function callAsImportantFlag_post(){ + $trackID = $this->post('trackId'); + $flagStatus = $this->post('flag'); + $updateFlag = $this->Calltracking_model->updateFlagStatus($trackID,$flagStatus); + + if ($updateFlag) + { + $updateFlag['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($updateFlag, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + + }