public JsonResult SetBotNetworking(string id, bool?networkingEnabled)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(Json(false));
            }
            if (networkingEnabled == null)
            {
                return(Json(false));
            }

            var botDto = _botsRepository.SetNetWorkingStatus(id, networkingEnabled ?? false);

            return(botDto != null
                                ? Json(botDto.Transform())
                                : Json(false));
        }
        public async Task <RedirectResult> SetNetWorking(string id, bool status)
        {
            _botsRepository.SetNetWorkingStatus(id, status);

            return(Redirect($"/bot?id={id}"));
        }