TEMPLATE MODIFIED

This commit is contained in:
velz 2018-09-12 18:35:26 +05:30
parent 7e4dc13952
commit de16a59a34

View File

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