first output draft of app navigation with sections

This commit is contained in:
2020-04-05 13:05:39 +02:00
parent 716d0b15c4
commit 31fbcc4af4
16 changed files with 221 additions and 34 deletions
@@ -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 SectionsController : BackofficeController
{
private ZeroOptions Options { get; set; }
public SectionsController(IZeroConfiguration config, IOptionsMonitor<ZeroOptions> options) : base(config)
{
Options = options.CurrentValue;
}
public IActionResult GetAll()
{
return Json(Options.Sections.ToList());
}
}
}