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

38 lines
820 B
C#
Raw Normal View History

2020-03-22 14:47:59 +01:00
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using zero.Core;
using zero.Core.Extensions;
2020-04-16 00:56:22 +02:00
using zero.Core.Identity;
2020-04-15 15:13:38 +02:00
using zero.Web.Models;
2020-03-22 14:47:59 +01:00
2020-03-24 23:09:29 +01:00
namespace zero.Web.Controllers
2020-03-22 14:47:59 +01:00
{
2020-04-15 14:09:52 +02:00
[ZeroAuthorize(false)]
2020-03-22 14:47:59 +01:00
public class IndexController : BackofficeController
{
private ZeroOptions Options { get; set; }
2020-04-15 15:13:38 +02:00
private IZeroVue ZeroVue { get; set; }
public IndexController(IZeroConfiguration config, IZeroVue zeroVue) : base(config)
{
2020-04-15 15:13:38 +02:00
ZeroVue = zeroVue;
}
2020-03-22 14:47:59 +01:00
public IActionResult Index()
{
if (Configuration.ZeroVersion.IsNullOrEmpty())
{
return RedirectToAction("Index", "Setup");
}
2020-04-15 15:13:38 +02:00
return View("/Views/Index.cshtml", new ZeroBackofficeModel()
{
Vue = ZeroVue
});
2020-03-22 14:47:59 +01:00
}
}
}