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

26 lines
570 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 SectionsController : BackofficeController
2020-04-05 00:54:18 +02:00
{
private ZeroOptions Options { get; set; }
public SectionsController(IZeroConfiguration config, IOptionsMonitor<ZeroOptions> options) : base(config)
2020-04-05 00:54:18 +02:00
{
Options = options.CurrentValue;
}
public IActionResult GetAll()
{
return Json(Options.Sections.ToList());
}
}
}