diff --git a/EnvelopeGenerator.Web/Controllers/ConfigController.cs b/EnvelopeGenerator.Web/Controllers/ConfigController.cs index b381b15d..edf4859f 100644 --- a/EnvelopeGenerator.Web/Controllers/ConfigController.cs +++ b/EnvelopeGenerator.Web/Controllers/ConfigController.cs @@ -1,5 +1,4 @@ -using AngleSharp.Common; -using EnvelopeGenerator.Web.Models; +using EnvelopeGenerator.Web.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; @@ -19,6 +18,6 @@ public class ConfigController : ControllerBase [HttpGet("Annotations")] public IActionResult GetAnnotationParams() { - return Ok(_annotParams.Annotations.ToDictionary(a => a.Name.ToLower(), a => a)); + return Ok(_annotParams.AnnotationDictionary); } } diff --git a/EnvelopeGenerator.Web/Models/AnnotationParams.cs b/EnvelopeGenerator.Web/Models/AnnotationParams.cs index 70410e17..052968e1 100644 --- a/EnvelopeGenerator.Web/Models/AnnotationParams.cs +++ b/EnvelopeGenerator.Web/Models/AnnotationParams.cs @@ -48,6 +48,10 @@ public class AnnotationParams throw new InvalidOperationException($"{verBoundAnnotName} added as bound anotation. However, it is not defined."); #endregion } + + AnnotationDictionary = _annots.ToDictionary(a => a.Name.ToLower(), a => a); } } + + public Dictionary AnnotationDictionary { get; private init; } = new(); }