delete video api : ps
This commit is contained in:
parent
c213601492
commit
792ff79582
@ -9780,14 +9780,19 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// To Inactive Video Recorded.
|
||||
public function deleteVideo_post(){
|
||||
$multipleWhere = $this->post();
|
||||
$multipleWhere['fk_pd_id'] = $multipleWhere['pd_id'];
|
||||
unset($multipleWhere['pd_id']);
|
||||
$this->load->helper('video_grabber_helper');
|
||||
$result_data = (new video_grabber_helper)->deleteVideo($multipleWhere);
|
||||
public function deleteVideo_get(){
|
||||
$id = $this->get('id');
|
||||
$id = (int) $id;
|
||||
if(!empty($id)){
|
||||
// $multipleWhere['fk_pd_id'] = $multipleWhere['pd_id'];
|
||||
// unset($multipleWhere['pd_id']);
|
||||
$this->load->helper('video_grabber_helper');
|
||||
$result_data = (new video_grabber_helper)->deleteVideo($id);
|
||||
}else{
|
||||
$result_data = "ID Not Available. Unable to Delete";
|
||||
}
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['msg'] = $result_data ;
|
||||
|
||||
@ -35,11 +35,11 @@ class video_grabber_helper
|
||||
{
|
||||
$final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$file_name;
|
||||
$singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$final_key,'+7 days');
|
||||
$result_data[] = array('video_name' => $video_name,'url' => $singed_uri,'status' => $value['twilo_status'],'room_id' => $value['room_id']);
|
||||
$result_data[] = array('video_name' => $video_name,'url' => $singed_uri,'status' => $value['twilo_status'],'room_id' => $value['room_id'],'id' => $value['video_room_info_id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result_data[] = array('video_name' => $video_name, 'url' => '','status' =>'processing','room_id' => $value['room_id']);
|
||||
$result_data[] = array('video_name' => $video_name, 'url' => '','status' =>'processing','room_id' => $value['room_id'],'id' => $value['video_room_info_id']);
|
||||
}
|
||||
|
||||
}
|
||||
@ -49,15 +49,14 @@ class video_grabber_helper
|
||||
return $result_data;
|
||||
|
||||
}
|
||||
public function deleteVideo($multipleWhere)
|
||||
public function deleteVideo($id)
|
||||
{
|
||||
$CI =&get_instance();
|
||||
$updateRows = array('isactive' => 0);
|
||||
// $multipleWhere = array('fk_pd_id' => $pdid, 'room_id' => $roomid);
|
||||
$CI->db->where($multipleWhere);
|
||||
$CI->db->update(VIDEO_ROOM_INFO, $updateRows);
|
||||
$affectedRows = $CI->db->affected_rows();
|
||||
return (($affectedRows > 0 ) ? "Deleted successfully" : "Fail to Delete");
|
||||
$CI =&get_instance();
|
||||
$updateRows = array('isactive' => 0);
|
||||
$CI->db->where('video_room_info_id =',$id);
|
||||
$CI->db->update(VIDEO_ROOM_INFO, $updateRows);
|
||||
$affectedRows = $CI->db->affected_rows();
|
||||
return (($affectedRows > 0 ) ? "Deleted successfully" : "Fail to Delete");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user