diff options
Diffstat (limited to 'src/Pages/Login.cshtml.cs')
| -rw-r--r-- | src/Pages/Login.cshtml.cs | 13 |
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 |
