Fix: 401 al ingresar a la web de login para el panel de admin

This commit is contained in:
2025-12-05 14:39:46 -03:00
parent 4d1cb25326
commit d38a88869c
2 changed files with 11 additions and 3 deletions

View File

@@ -67,6 +67,13 @@ public class AuthController : ControllerBase
return Ok(new { message = "Sesión cerrada" });
}
[HttpGet("status")]
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
public IActionResult GetStatus()
{
return Ok(new { isAuthenticated = User.Identity?.IsAuthenticated ?? false });
}
#if DEBUG
// [SEGURIDAD] Endpoint solo para desarrollo
[HttpPost("setup-admin")]