public async Task <IActionResult> AddBot(string name, string token, string message) { var botDto = _botsRepository.AddBot(new Bot { Name = Regex.Replace(name, @"\s+", ""), Token = token, NetworkingEnabled = true, CognitiveServicesEnabled = true, StartMessage = message }); var userId = HttpContext.Session.GetString("userId"); _systemUserRepository.AddBotToUser(userId, botDto.Id.ToString()); await _httpClient.GetStringAsync($"{_configuration["RunnerApiUrl"]}/start?id={botDto.Id}"); return(Redirect($"/bot?id={botDto.Id}")); }