course details changes done

This commit is contained in:
gandhimathi 2018-01-23 15:53:00 +05:30
parent db18b26d86
commit 3d9108c58d

View File

@ -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
}
}