diff --git a/zero.Web/Controllers/SectionController.cs b/zero.Web/Controllers/SectionController.cs new file mode 100644 index 00000000..1687736c --- /dev/null +++ b/zero.Web/Controllers/SectionController.cs @@ -0,0 +1,25 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; +using System.Linq; +using zero.Core; + +namespace zero.Web.Controllers +{ + [AllowAnonymous] + public class SectionController : BackofficeController + { + private ZeroOptions Options { get; set; } + + public SectionController(IZeroConfiguration config, IOptionsMonitor options) : base(config) + { + Options = options.CurrentValue; + } + + + public IActionResult GetAll() + { + return Json(Options.Sections.ToList()); + } + } +}