public async Task <ActionResult <IList <TunnelInformationDto> > > ListTunnels() { var containers = await _dockerManager.GetAllContainers(); var tunnels = containers .Select(TunnelInformationMapper.MapContainerResponse) .ToList(); return(Ok(tunnels)); }
public async Task <ActionResult> GetTunnelInfo(string id) { var all = await _dockerManager.GetAllContainers(); var c = all.FirstOrDefault(e => e.ID == id); if (c == null) { return(BadRequest("Container not found")); } return(Ok(TunnelInformationMapper.MapContainerResponse(c))); }