Commit 881a8df8 by Jansa Jose

add new api -remove vehicle

parent 31131013
...@@ -2613,5 +2613,14 @@ ...@@ -2613,5 +2613,14 @@
$result = $this->Webservice_model->getCustVehDetails($postData); $result = $this->Webservice_model->getCustVehDetails($postData);
echo json_encode($result);exit; echo json_encode($result);exit;
} }
public function remove_vehicle(){
header('Content-type:application/json');
$headers = apache_request_headers();
$post = file_get_contents("php://input");
$postData = json_decode($post,true);
$result = $this->Webservice_model->remove_vehicle($postData);
echo json_encode($result);exit;
}
} }
?> ?>
...@@ -1475,5 +1475,18 @@ class Webservice_model extends CI_Model { ...@@ -1475,5 +1475,18 @@ class Webservice_model extends CI_Model {
return $respArr; return $respArr;
} }
public function remove_vehicle($postData = array()){
$respArr = array('status'=>'error');
if(empty($postData['customer_veh_id'])){
$respArr['message'] = 'Vehicle Id is Required' ;
return $respArr;
}
if($this->db->update("customer_vehicle",array('status'=>'2'),array("customer_veh_id"=>$postData['customer_veh_id']))){
$respArr['status'] = "success";
$respArr['message'] = "Vehicle Deleted Successfully";
}
}
} }
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment