Commit eb48845b by Jansa Jose

change in mechanic app

parent 639dbe15
...@@ -54,8 +54,7 @@ ...@@ -54,8 +54,7 @@
if($authRes['status'] == 'error'){ if($authRes['status'] == 'error'){
echo json_encode($authRes);exit; echo json_encode($authRes);exit;
} }
$post = file_get_contents("php://input"); $postData = $_GET;
$postData = json_decode($post, true);
$per_page = 10; $per_page = 10;
$page = (isset($postData['page']) && $postData['page'] >= 1)?(int)$postData['page']:1; $page = (isset($postData['page']) && $postData['page'] >= 1)?(int)$postData['page']:1;
$start = ($page - 1) * $per_page; $start = ($page - 1) * $per_page;
...@@ -135,11 +134,10 @@ ...@@ -135,11 +134,10 @@
if($authRes['status'] == 'error'){ if($authRes['status'] == 'error'){
echo json_encode($authRes);exit; echo json_encode($authRes);exit;
} }
$postData = $_GET;
$per_page = 10; $per_page = 10;
$page = (isset($postData['page']) && $postData['page'] >= 1)?(int)$postData['page']:1; $page = (isset($postData['page']) && $postData['page'] >= 1)?(int)$postData['page']:1;
$start = ($page - 1) * $per_page; $start = ($page - 1) * $per_page;
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$postData['mechanic_id'] = $authRes['data']['mechanic_id']; $postData['mechanic_id'] = $authRes['data']['mechanic_id'];
$bookDataCount = $this->Webservice_mechanic_model->getBookedService($postData,0,0,0,3); $bookDataCount = $this->Webservice_mechanic_model->getBookedService($postData,0,0,0,3);
$bookDataResult=$this->Webservice_mechanic_model->getBookedService($postData,$start,$per_page,0,3); $bookDataResult=$this->Webservice_mechanic_model->getBookedService($postData,$start,$per_page,0,3);
......
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