2025-01-24 19:17:26 -03:00
|
|
|
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
|
|
namespace phronCare.API.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
//[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
|
|
|
|
|
|
[Route("api/[controller]")]
|
|
|
|
|
|
[ApiController]
|
|
|
|
|
|
|
|
|
|
|
|
public class TestController : ControllerBase
|
|
|
|
|
|
{
|
|
|
|
|
|
[Authorize(Roles = "User")]
|
|
|
|
|
|
[HttpGet("empleados")]
|
|
|
|
|
|
public IEnumerable<string> GetEmpleados()
|
|
|
|
|
|
{
|
2025-04-28 18:43:59 -03:00
|
|
|
|
return new List<string> { "SOS USUARIO", "Griselda", "Agustin","Victoria" };
|
2025-01-24 19:17:26 -03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Authorize (Roles ="Admin")]
|
|
|
|
|
|
[HttpGet("administradores")]
|
|
|
|
|
|
|
|
|
|
|
|
public IEnumerable<string> GetAdministradores()
|
|
|
|
|
|
{
|
2025-04-28 18:43:59 -03:00
|
|
|
|
return new List<string> { "SOS ADMINISTRADOR", "Griselda", "Agustin", "Victoria" };
|
2025-01-24 19:17:26 -03:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|