Put auth on account index page to force login

This commit is contained in:
Robert Marshall 2020-03-15 10:31:31 +00:00
parent 23a51bf18d
commit ab8745a418

View file

@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Website.Data;
using Website.Models;
@ -13,6 +14,7 @@ namespace Website.Controllers {
public AccountController(UserRepository repo) => _repo = repo;
[Authorize]
public IActionResult Index() => View();
[HttpGet]