This commit is contained in:
2024-03-08 07:51:57 +01:00
commit e84a2f4f8d
191 changed files with 43915 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
using Kemkas.Web.Db.Models;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
namespace Kemkas.Web.Controllers;
[Route("[controller]")]
[ApiController]
public class UserController : ControllerBase
{
// GET
[HttpGet("me")]
public async Task<string?> Me([FromServices] UserManager<ApplicationUser> userManager)
{
var user = await userManager.GetUserAsync(User);
return user?.UserName ?? user?.Email;
}
}