Example #1
0
        public async Task <IHttpActionResult> AllClouds()
        {
            try
            {
                var apps = await Task.Run(() => _cloudService.GetAllClouds());

                var clouds = apps.Select(c => c.ToDto()).ToList();
                return(Ok(clouds));
            }
            catch (Exception ex)
            {
                return(CreateErrorResponse("获取所有云失败:", HttpStatusCode.ServiceUnavailable, ex, Log));
            }
        }