Commit a9a8988c by Tobin

dc

parent 9541a6e8
...@@ -31,10 +31,10 @@ class Api extends CI_Controller { ...@@ -31,10 +31,10 @@ class Api extends CI_Controller {
if($method == 'profile') { if($method == 'profile') {
$data = $_POST; $data = $_POST;
} }
if (isset(apache_request_headers()['Auth'])) { if (isset(apache_request_headers()['Auth']) || isset(apache_request_headers()['auth'])) {
$this->auth_token = apache_request_headers()['Auth']; $this->auth_token = (isset(apache_request_headers()['Auth']))?apache_request_headers()['Auth']:apache_request_headers()['auth'];
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
} }
$res = $this->Validation_model->validation_check($method, $data); $res = $this->Validation_model->validation_check($method, $data);
if($res['state'] == 1) { if($res['state'] == 1) {
$this->errorResponse($res['response']['code'], $res['response']['message']); $this->errorResponse($res['response']['code'], $res['response']['message']);
......
...@@ -30,9 +30,9 @@ class Webservice extends CI_Controller { ...@@ -30,9 +30,9 @@ class Webservice extends CI_Controller {
$data = $_POST; $data = $_POST;
} }
if (isset(apache_request_headers()['Auth']) || isset(apache_request_headers()['auth'])) { if (isset(apache_request_headers()['Auth']) || isset(apache_request_headers()['auth'])) {
$this->auth_token = (isset(apache_request_headers()['Auth']))?apache_request_headers()['Auth']:apache_request_headers()['auth']; $this->auth_token = (isset(apache_request_headers()['Auth']))?apache_request_headers()['Auth']:apache_request_headers()['auth'];
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
} }
$res = $this->Validation_app_model->validation_check($method, $data); $res = $this->Validation_app_model->validation_check($method, $data);
if($res['state'] == 1) { if($res['state'] == 1) {
$this->errorResponse($res['response']['code'], $res['response']['message']); $this->errorResponse($res['response']['code'], $res['response']['message']);
......
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