public async Task <IActionResult> ForgotPassword(ForgotPassword forgotPassword) { try { var result = await _masterRepository.ForgotPassword(forgotPassword); if (result.Comment == "Password is already used") { return(BadRequest("Password is already used")); } return(Ok(result)); } catch (Exception ex) { ErrorLog.WriteToFile("Master/ForgotPassword : - ", ex); return(BadRequest(ex.Message)); } }