public async Task <IActionResult> ResetPassword([FromBody] ResetPasswordModel model) { #region Validate Model //var userInputValidated = _resetPasswordValidator.Validate(model); //if (!userInputValidated.IsValid) // return BadRequest(new { // Succeeded = false, // Message = _badRequest.ShowError(int.Parse(userInputValidated.Errors[0].ErrorMessage)) // }); #endregion var resetPassword = await _user.ResetPassword(model); return(Ok(resetPassword)); }
public async Task <IActionResult> ResetPassword([FromBody] ResetPasswordModel model) { #region Validate Model var userInputValidated = _resetPasswordValidator.Validate(model); if (!userInputValidated.IsValid) { _infos.Add(_badRequest.ShowError(int.Parse(userInputValidated.Errors[0].ErrorMessage)).Message); return(BadRequest(new CustomResponse <string> { Message = _infos })); } #endregion var resetPassword = await _user.ResetPassword(model); return(Ok(resetPassword)); }