Added a few controllers and views

This commit is contained in:
2025-11-29 21:15:56 +01:00
parent f9a41263a5
commit 6819d1e38b
18 changed files with 2073 additions and 6 deletions

View File

@@ -0,0 +1,35 @@
using System.CodeDom.Compiler;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
namespace OneForMe.Controllers;
[Route("[controller]")]
public class AuthViewController : Controller
{
private readonly SignInManager<IdentityUser> _signInManager;
public AuthViewController(SignInManager<IdentityUser> signInManager)
{
_signInManager = signInManager;
}
[HttpGet("Login")]
public IActionResult Login()
{
return View();
}
[HttpGet("Register")]
public IActionResult Register()
{
return View();
}
[HttpPost("Logout")]
public async Task<IActionResult> Logout()
{
await _signInManager.SignOutAsync();
return RedirectToAction("Index", "Home");
}
}