常用方法
常用方法
常用方法
常用方法
public IActionResult SendPasswordToken([FromBody] UserDto userDto) { try { var passwordToken = UsersService.CreateActivationKey(); UsersService.AddPasswordTokenToTable(passwordToken, UsersService.FindUser(userDto.Email)); UsersService.SendPasswordToken(userDto.Email, passwordToken); return(Ok()); } catch (Exception ex) { // return error message if there was an exception return(BadRequest(new { message = ex.Message })); } }