Files
mixtape/zero.Web/Controllers/SectionController.cs
T

26 lines
568 B
C#
Raw Normal View History

2020-04-05 00:54:18 +02:00
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<ZeroOptions> options) : base(config)
{
Options = options.CurrentValue;
}
public IActionResult GetAll()
{
return Json(Options.Sections.ToList());
}
}
}