Commit 0869a7ed by Tobin

Merge branch 'master' of https://gitlab.techware.co.in/timeout/timeOut into tobin

# Conflicts: # application/controllers/Webservice.php # application/models/Webservice_model.php
parents 48b12131 c275c17a
......@@ -74,11 +74,11 @@ $active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'dsn' => '',
'hostname' => '192.168.140.123',
'username' => 'root',
'password' => 'Golden_123',
'database' => 'timeout_uat',
'password' => 'Golden_123',
'database' => 'tobin_eventTimeOut',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
......
......@@ -28,7 +28,7 @@ class OrganizerServices extends CI_Controller {
$this->load->model('Validation_organizer_model');
$method = $this->router->fetch_method();
$data = (array) json_decode(file_get_contents('php://input'));
if($method == 'addEvent' || $method == 'editOrganizerEventDetails') {
if($method == 'addEvent') {
$data = $_POST;
}
if (isset(apache_request_headers()['Auth'])) {
......@@ -90,7 +90,7 @@ class OrganizerServices extends CI_Controller {
}
public function editOrganizerEventDetails(){
$data = $_POST;
$data =(array)json_decode(file_get_contents('php://input'));
$res = $this->Organizer_model->editOrganizerEventDetails($data);
if($res['status'] != 0){
$this->successResponse($res);
......@@ -210,6 +210,16 @@ class OrganizerServices extends CI_Controller {
}
}
public function checkerDelete(){
$data = (array) json_decode(file_get_contents('php://input'));
$res = $this->Organizer_model->checkerDelete($data);
if($res['status'] != 0){
$this->successResponse($res);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
public function getTagList(){
$data = (array) json_decode(file_get_contents('php://input'));
$res = $this->Organizer_model->getTagList($data);
......
......@@ -132,7 +132,7 @@ class Webservice extends CI_Controller {
print json_encode($result);
}
public function successResponse($data='') {
public function successResponse($data) {
$result = array(
'status' => 'success',
);
......@@ -581,14 +581,79 @@ class Webservice extends CI_Controller {
}
}
public function update_user_visibility(){
public function get_hotel_city_list(){
$data = $_GET;
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_model->get_hotel_city_list($data);
if($res['status'] == 1){
$this->response($res['data']);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
public function hotel_search(){
$data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_model->hotel_search($data);
if($res['status'] == 1){
$this->response($res['data']);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
public function get_specific_hotel_content(){
$data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_model->get_specific_hotel_content($data);
if($res['status'] == 1){
$this->response($res['data']);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
public function get_room_rates(){
$data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_model->get_room_rates($data);
if($res['status'] == 1){
$this->response($res['data']);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
public function get_rate_rules(){
$data = (array) json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_model->get_rate_rules($data);
if($res['status'] == 1){
$this->response($res['data']);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
public function hotel_book(){
$data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_model->hotel_book($data);
if($res['status'] == 1){
$this->response($res['data']);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
$res = $this->Webservice_model->update_user_visibility($data);
if($res['status'] != 0){
$this->successResponse();
} else {
public function trawex_cancel_booking(){
$data = (array)json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_model->trawex_cancel_booking($data);
if($res['status'] == 1){
$this->response($res['data']);
}else{
$this->errorResponse($res['code'],$res['message']);
}
}
......
......@@ -274,12 +274,6 @@ class Validation_organizer_model extends CI_Model {
'message' => 'Tag is null or empty'
)
),
'layout' => array(
'required' => array(
'code' => 'ER18',
'message' => 'Layout is null or empty'
)
),
),
'getLanguages'=>array(),
'getCategories'=>array(),
......@@ -363,6 +357,20 @@ class Validation_organizer_model extends CI_Model {
)
),
),
'checkerDelete'=>array(
'organiser_id'=>array(
'required'=>array(
'code'=>'ER30',
'message'=>'Organizer Id is null or empty'
)
),
'checker_id'=>array(
'required'=>array(
'code'=>'ER30',
'message'=>'Checker Id is null or empty'
)
),
),
);
public function _consruct(){
......
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