using AngleSharp.Common; using EnvelopeGenerator.Web.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; namespace EnvelopeGenerator.Web.Controllers; [Route("api/[controller]")] [ApiController] public class ConfigController : ControllerBase { private readonly AnnotationParams _annotParams; public ConfigController(IOptions annotationParamsOptions) { _annotParams = annotationParamsOptions.Value; } [HttpGet("Annotations")] public IActionResult GetAnnotationParams() { return Ok(_annotParams.Annotations.ToDictionary(a => a.Name.ToLower(), a => a)); } }