GWM : add dependent api
This commit is contained in:
parent
0696a5a35e
commit
e75c769801
@ -435,6 +435,7 @@ $routes->post("/employeeRest/verifyEmployeeEmailId", "RestAuthenticationControll
|
|||||||
|
|
||||||
//HR login api's
|
//HR login api's
|
||||||
$routes->post("/employeeRest/verifyHrWithMobileNumber", "RestAuthenticationController::verifyHrWithMobileNumber");
|
$routes->post("/employeeRest/verifyHrWithMobileNumber", "RestAuthenticationController::verifyHrWithMobileNumber");
|
||||||
|
$routes->post("/employeeRest/verifyHrWithEmail", "RestAuthenticationController::verifyHrWithEmail");
|
||||||
$routes->post("/employeeRest/getVerifiedHrData", "RestAuthenticationController::getVerifiedHrData");
|
$routes->post("/employeeRest/getVerifiedHrData", "RestAuthenticationController::getVerifiedHrData");
|
||||||
|
|
||||||
$routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
$routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
||||||
|
|||||||
@ -292,6 +292,30 @@ class RestAuthenticationController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function verifyHrWithEmail()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$email = $this->request->getJSON()->email;
|
||||||
|
|
||||||
|
$HrData = $this->hrModel->where('email', $email)
|
||||||
|
->where('contact_type', 'client')
|
||||||
|
->where('is_active', 1)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($HrData) {
|
||||||
|
|
||||||
|
$result = ['user_verification' => true ,'message' => "Verified Successfully"];
|
||||||
|
return $this->respond(['status' => 'success','code' => 200,'data' => $result],200);
|
||||||
|
} else {
|
||||||
|
// Call the third-party API function
|
||||||
|
return $this->callThirdPartyAPI($this->request->getJSON(),'verifyHrWithEmail');
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return $this->respond(['status' => 'failed','code' => 500,'data' => $th],500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getVerifiedHrData()
|
public function getVerifiedHrData()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user