diff --git a/www-api/app/Config/Routes.php b/www-api/app/Config/Routes.php index c188ac5d..2fefbe36 100644 --- a/www-api/app/Config/Routes.php +++ b/www-api/app/Config/Routes.php @@ -69,6 +69,7 @@ $routes->post('/en/wrench/api/v1/paymenthx', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/purchasehx', 'WrenchApi::apigate'); +$routes->post('/en/wrench/api/v1/stepresetpass', 'WrenchApi::apigate'); $routes->post('/en/wrench/api/v1/starttopup', 'WrenchApi::apigate'); diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index fd03facb..d7ba4af6 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -38,6 +38,7 @@ class WrenchApi extends BaseController 'createmobileuser' => ['POST'], 'completemobileuser' => ['POST'], 'startresetpasword' => ['POST'], + 'stepresetpass' => ['POST'], 'userlogin' => ['POST'], 'startjoblist' => ['POST'], 'dashdata' => ['POST'], @@ -87,6 +88,11 @@ class WrenchApi extends BaseController private function prepareEndPointData($endpoint, $in, &$call_backend=true,&$local_out=[]){ switch ($endpoint) { + case 'stepresetpass': + if($in['step']==300){ + $in["action"] = WRENCHBOARD_COMPLETE_PASSWORDRESET; + } + break; case 'starttopup': $in["action"] = WRENCHBOARD_ACCOUNT_PREPARE_TOPUP; break; diff --git a/www-api/public/svs/user/userve.php b/www-api/public/svs/user/userve.php index d16cd638..eb4a60a5 100755 --- a/www-api/public/svs/user/userve.php +++ b/www-api/public/svs/user/userve.php @@ -17,6 +17,7 @@ $endpoints = array( 'createmobileuser' => array('POST'), 'completemobileuser' => array('POST'), 'startresetpasword' => array('POST'), + 'stepresetpass' => array('POST'), 'userlogin' => array('POST'), 'startjoblist' => array('POST'), 'dashdata' => array('POST'), @@ -122,6 +123,11 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") { } $in["loc"] = $_SERVER["REMOTE_ADDR"]; switch ($endpoint) { + case 'stepresetpass': + if($in['step']==300){ + $in["action"] = WRENCHBOARD_COMPLETE_PASSWORDRESET; + } + break; case 'starttopup': $in["action"] = WRENCHBOARD_ACCOUNT_PREPARE_TOPUP; break;