diff --git a/api/v1/get/contracts.php b/api/v1/get/contracts.php index 67ddc90..9c20144 100644 --- a/api/v1/get/contracts.php +++ b/api/v1/get/contracts.php @@ -76,11 +76,11 @@ if(isset($criterias['totals']) && $criterias['totals'] ==''){ } elseif (isset($criterias['list']) && $criterias['list'] =='') { //SQL for Paging - $sql = 'SELECT * FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.''; + $sql = 'SELECT c.* FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.''; } else { //SQL for Paging - $sql = 'SELECT * FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.' LIMIT :page,:num_products'; + $sql = 'SELECT c.* FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.' LIMIT :page,:num_products'; } $stmt = $pdo->prepare($sql); diff --git a/api/v1/post/users.php b/api/v1/post/users.php index 2730789..f779406 100644 --- a/api/v1/post/users.php +++ b/api/v1/post/users.php @@ -155,6 +155,7 @@ elseif ($command == 'insert'){ $post_content['password'] = generate_jwt($headers, $payload); $post_content['partnerhierarchy'] = $accounthierarchy; $post_content['salesID'] = $partner->salesid; + $post_content['language'] = isset($post_content['language']) ? $post_content['language'] : 'US'; } else { //do nothing diff --git a/api/v2/get/contracts.php b/api/v2/get/contracts.php index 79c76b0..56334de 100644 --- a/api/v2/get/contracts.php +++ b/api/v2/get/contracts.php @@ -76,15 +76,15 @@ if(isset($criterias['totals']) && $criterias['totals'] ==''){ } elseif (isset($criterias['list']) && $criterias['list'] =='') { //SQL for Paging - $sql = 'SELECT * FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.''; + $sql = 'SELECT c.* FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.''; } elseif (isset($criterias['p']) && $criterias['p'] =='all') { //SQL for Paging - $sql = 'SELECT * FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.''; + $sql = 'SELECT c.* FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.''; } else { //SQL for Paging - $sql = 'SELECT * FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.' LIMIT :page,:num_products'; + $sql = 'SELECT c.* FROM contracts c JOIN users u ON c.createdby = u.username '.$whereclause.' LIMIT :page,:num_products'; } $stmt = $pdo->prepare($sql); diff --git a/api/v2/post/users.php b/api/v2/post/users.php index 16a8f81..94ea628 100644 --- a/api/v2/post/users.php +++ b/api/v2/post/users.php @@ -155,6 +155,7 @@ elseif ($command == 'insert'){ $post_content['password'] = generate_jwt($headers, $payload); $post_content['partnerhierarchy'] = $accounthierarchy; $post_content['salesID'] = $partner->salesid; + $post_content['language'] = isset($post_content['language']) ? $post_content['language'] : 'US'; } else { //do nothing