Comenzando la implementación final de permisos y depuración. Se sigue...
This commit is contained in:
@@ -71,6 +71,25 @@ namespace GestionIntegral.Api.Controllers.Impresion
|
||||
}
|
||||
}
|
||||
|
||||
// GET: api/plantas/dropdown
|
||||
[HttpGet("dropdown")]
|
||||
[ProducesResponseType(typeof(IEnumerable<PlantaDropdownDto>), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
// NO chequeo TienePermiso("IP001")(requiere autenticación)
|
||||
public async Task<IActionResult> GetPlantasForDropdown()
|
||||
{
|
||||
try
|
||||
{
|
||||
var plantas = await _plantaService.ObtenerParaDropdownAsync();
|
||||
return Ok(plantas);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error al obtener plantas para dropdown.");
|
||||
return StatusCode(StatusCodes.Status500InternalServerError, "Error interno al obtener plantas para selección.");
|
||||
}
|
||||
}
|
||||
|
||||
// GET: api/plantas/{id}
|
||||
// Permiso: IP001 (Ver Plantas)
|
||||
[HttpGet("{id:int}", Name = "GetPlantaById")]
|
||||
|
||||
Reference in New Issue
Block a user