Fix logged in state claim id

This commit is contained in:
2025-07-21 16:45:16 -07:00
parent c87ef1cfc2
commit c16f8004d7
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using BoredCareers.Entities;
using BoredCareers.Services.DatabaseService;
using System.Security.Claims;
namespace BoredCareers.Controllers {
@@ -20,7 +21,7 @@ namespace BoredCareers.Controllers {
}
public int getLoggedInUserID() {
return Convert.ToInt32(User.FindFirst("ID")?.Value);
return Convert.ToInt32(User.FindFirstValue(ClaimTypes.NameIdentifier));
}
public async Task<Account> getLoggedInUser() {