} // // // User // // $app->post("/User/Show/:id", function () use($app) { require "../src/services/User.php"; //TODO: check this later include_once dirname(__FILE__) . '../../include/Config.php'; // verifyRequiredParams(array("loginname", "password", "deviceid", "ipaddress", "gpscoordinates")); // $userID = $app->request->post("userid"); $request = $app->request(); $userData = json_decode($request->post('data')); $data = $userData->id; $userObj = new User(); $response = $userObj->Show($data); if ($response == null || $response == FAILED) { handleErrorResponse($response); } echoResponse(SUCCESS_CODE, $response); }); // // ServiceAPIUtils::CallAPIService( $dataArray,"/User/ShowAll/123", "json" ); $app->post("/User/Authenticate/123", function () use($app) { require "../src/services/User.php"; //TODO: check this later include_once dirname(__FILE__) . '../../include/Config.php'; // verifyRequiredParams(array("loginname", "password", "deviceid", "ipaddress", "gpscoordinates")); // $userID = $app->request->post("userid"); //$request = Slim::getInstance()->request(); $request = $app->request(); $userData = json_decode($request->post('data'));