2020-05-11 15:34:47 +02:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2020-03-25 23:24:58 +01:00
|
|
|
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
|
|
|
|
|
{
|
2020-04-15 15:13:38 +02:00
|
|
|
private IZeroVue ZeroVue { get; set; }
|
|
|
|
|
|
2020-05-11 15:34:47 +02:00
|
|
|
public IndexController(IZeroVue zeroVue)
|
2020-03-25 23:24:58 +01:00
|
|
|
{
|
2020-04-15 15:13:38 +02:00
|
|
|
ZeroVue = zeroVue;
|
2020-03-25 23:24:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2020-03-22 14:47:59 +01:00
|
|
|
public IActionResult Index()
|
|
|
|
|
{
|
2020-05-11 15:34:47 +02:00
|
|
|
if (Options.ZeroVersion.IsNullOrEmpty())
|
2020-03-25 23:24:58 +01:00
|
|
|
{
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|