using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; namespace Jerguero.Pages { public class NewDefinitionModel : PageModel { public IActionResult OnGet() { if (User.Identity?.IsAuthenticated != true) { return RedirectToPage($"/Login", new {redirect = "/New"}); } return Page(); } } }