From 3f4c0720e1e3421431e7baa20882a4a4512a7fab Mon Sep 17 00:00:00 2001 From: ivar Date: Sun, 19 Oct 2025 23:41:23 +0200 Subject: Initial --- src/Pages/Login.cshtml.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/Pages/Login.cshtml.cs (limited to 'src/Pages/Login.cshtml.cs') diff --git a/src/Pages/Login.cshtml.cs b/src/Pages/Login.cshtml.cs new file mode 100644 index 0000000..11508d3 --- /dev/null +++ b/src/Pages/Login.cshtml.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace IOL.Fagprove.Pages +{ + public class LoginModel : PageModel + { + public ActionResult OnGet() { + if (!User.Identity.IsAuthenticated) return Page(); + return Redirect("/app"); + } + } +} \ No newline at end of file -- cgit v1.3