poprawka - autoryzacja w controllerze usera

This commit is contained in:
Maciej Maciejewski 2025-01-02 22:57:45 +01:00
parent 30378d95ab
commit 567c3539ad

View File

@ -29,7 +29,7 @@ namespace FirmTracker_Server.Controllers
{
[Route("api/user")]
[ApiController]
//[Authorize]
[Authorize]
public class UserController : ControllerBase
{
private readonly IUserService UserService;
@ -40,7 +40,7 @@ namespace FirmTracker_Server.Controllers
}
[HttpPost("create")]
//[Authorize(Roles = Roles.Admin)]
[Authorize(Roles = Roles.Admin)]
public ActionResult CreateUser([FromBody] CreateUserDto dto)
{
if (!ModelState.IsValid)