public JsonResult SetBotCognitiveServiceStatus(string id, bool?status) { if (string.IsNullOrEmpty(id)) { return(Json(false)); } if (status == null) { return(Json(false)); } var botDto = _botsRepository.SetCognitiveServicesStatus(id, status ?? false); return(botDto != null ? Json(botDto) : Json(false)); }
public async Task <RedirectResult> SetCongnitiveServices(string id, bool status) { _botsRepository.SetCognitiveServicesStatus(id, status); return(Redirect($"/bot?id={id}")); }