jerguero-cs/Pages/New.cshtml.cs

19 lines
409 B
C#
Raw Normal View History

2024-08-24 00:49:31 +00:00
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
2024-08-24 16:45:34 +00:00
namespace Jerguero.Pages
2024-08-24 00:49:31 +00:00
{
public class NewDefinitionModel : PageModel
{
2024-08-24 01:44:57 +00:00
public IActionResult OnGet()
2024-08-24 00:49:31 +00:00
{
2024-08-24 01:44:57 +00:00
if (User.Identity?.IsAuthenticated != true)
{
2024-08-24 16:45:34 +00:00
return RedirectToPage($"/Login", new {redirect = "/New"});
2024-08-24 01:44:57 +00:00
}
return Page();
2024-08-24 00:49:31 +00:00
}
}
}