Пример #1
0
        public IHttpActionResult Destroy(string handle)
        {
            var container = containerService.GetContainerByHandleIncludingDestroyed(handle);

            if (container != null)
            {
                try
                {
                    containerService.DestroyContainer(handle);
                }
                catch (Exception e)
                {
                    logger.Error("Cannot delete container", new Dictionary <string, object>
                    {
                        { "handle", handle },
                        { "exception", e },
                    });
                    throw;
                }
                return(Ok());
            }

            return(NotFound());
        }