diff --git a/MP.IOC/Controllers/IOBController.cs b/MP.IOC/Controllers/IOBController.cs index a7e29794..d4c0b7ae 100644 --- a/MP.IOC/Controllers/IOBController.cs +++ b/MP.IOC/Controllers/IOBController.cs @@ -112,6 +112,25 @@ namespace MP.IOC.Controllers return "Errore interno del server"; //return StatusCode(500, "Errore interno del server"); } + +#if false + if (string.IsNullOrEmpty(id)) return BadRequest("Missing ID"); + + try + { + // Il metodo ora restituisce direttamente il booleano logico + bool isEnabled = await IOCService.IobInsEnabAsync(id); + + return isEnabled + ? Ok("OK") + : UnprocessableEntity("NO"); + } + catch (Exception ex) + { + Log.Error(ex, "Errore durante la verifica abilitazione per {Id}", id); + return StatusCode(500, "Errore interno del server"); + } +#endif } /// diff --git a/MP.RIOC/MP.RIOC.csproj b/MP.RIOC/MP.RIOC.csproj index 9adb0f4b..87280c4b 100644 --- a/MP.RIOC/MP.RIOC.csproj +++ b/MP.RIOC/MP.RIOC.csproj @@ -6,6 +6,7 @@ enable MP.RIOC 8.16.2606.1120 + InProcess