summaryrefslogtreecommitdiffstats
path: root/src/Pages/Login.cshtml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Pages/Login.cshtml.cs')
-rw-r--r--src/Pages/Login.cshtml.cs13
1 files changed, 13 insertions, 0 deletions
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