Commit 1c6efe3d by Jansa Jose

duplicate ride

parent 3504389f
...@@ -2661,7 +2661,7 @@ public function end_ride_update_post(){ ...@@ -2661,7 +2661,7 @@ public function end_ride_update_post(){
$headers = apache_request_headers(); $headers = apache_request_headers();
$data = (array) json_decode(file_get_contents("php://input")); $data = (array) json_decode(file_get_contents("php://input"));
if(isset($data['ride_id']) && strlen(trim($data['ride_id']," ")) > 0 && isset($data['departure_date']) && isset($data['days']) && strlen(trim($data['departure_date']," ")) > 0 && isset($data['detour_time']) && strlen(trim($data['detour_time']," ")) > 0) { if(isset($data['ride_id']) && strlen(trim($data['ride_id']," ")) > 0 && isset($data['departure_date']) && strlen(trim($data['departure_date']," ")) > 0 && isset($data['detour_time']) && strlen(trim($data['detour_time']," ")) > 0) {
$result = $this->Webservice_model->duplicate_ride($data); $result = $this->Webservice_model->duplicate_ride($data);
if($result['status'] == 'success'){ if($result['status'] == 'success'){
$res = array('status'=>'success'); $res = array('status'=>'success');
...@@ -2672,7 +2672,7 @@ public function end_ride_update_post(){ ...@@ -2672,7 +2672,7 @@ public function end_ride_update_post(){
$res = array( $res = array(
"status"=> "error", "status"=> "error",
"error"=> "Not Valid", "error"=> "Not Valid",
"message"=> "Authtoken is not valid" "message"=> "All Field is Required"
); );
} }
print json_encode($res); print json_encode($res);
......
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