diff --git a/ManagerService/Controllers/SectionController.cs b/ManagerService/Controllers/SectionController.cs index 9d11020..c013738 100644 --- a/ManagerService/Controllers/SectionController.cs +++ b/ManagerService/Controllers/SectionController.cs @@ -238,16 +238,13 @@ namespace ManagerService.Controllers [ProducesResponseType(typeof(List), 200)] [ProducesResponseType(typeof(string), 404)] [ProducesResponseType(typeof(string), 500)] - [HttpGet("beacons/{id}")] + [HttpGet("beacons/{instanceId}")] public ObjectResult GetAllBeaconsForInstance(string instanceId) { try { List
sections = _sectionService.GetAll(instanceId); - if (sections.Count == 0) - throw new KeyNotFoundException("No section has beacon"); - sections = sections.Where(s => s.IsBeacon && s.BeaconId != null).ToList(); return new OkObjectResult(sections.Select(s => s.ToDTO()));