Commit f308a5ab by Tobin

dc

parent 79ab4e49
......@@ -536,5 +536,17 @@ class Api extends CI_Controller {
public function verifyMail($unique_id = '') {
$res = $this->Api_model->verifyMail(array('unique_id'=>$unique_id));
}
public function checkSeatAvailability(){
$data = (array) json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token;
$res = $this->Api_model->checkSeatAvailability($data);
if($res['status']!=0){
$this->response($res['data']);
}
else{
$this->errorResponse($res['code'],$res['message']);
}
}
}
?>
......@@ -104,6 +104,20 @@ class Validation_model extends CI_Model {
) ,
) ,
) ,
'checkSeatAvailability' => array(
'event_id' => array(
'required' => array(
'code' => 'ER17',
'message' => 'Event Id is null or empty'
) ,
) ,
'time_id' => array(
'required' => array(
'code' => 'ER18',
'message' => 'Time Id is null or empty'
)
)
) ,
'bookingdetails' => array(
'auth_token' => array(
'required' => array(
......
......@@ -1472,7 +1472,7 @@ class Webservice_model extends CI_Model {
$res = array('status'=>1,'data'=>array('events'=>$result,'meta'=>$meta));
} else {
$res = array('status'=>1,'data'=>array('events'=>$result,'meta'=>$meta));
$res = array('status'=>1,'data'=>array('events'=>[],'meta'=>$meta));
}
} else {
$res = array('status'=>0,'message'=>'User Authentication Failed','code'=>'ER15');
......
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