poprawka - autoryzacja w controllerze usera
This commit is contained in:
parent
30378d95ab
commit
567c3539ad
@ -29,7 +29,7 @@ namespace FirmTracker_Server.Controllers
|
|||||||
{
|
{
|
||||||
[Route("api/user")]
|
[Route("api/user")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
//[Authorize]
|
[Authorize]
|
||||||
public class UserController : ControllerBase
|
public class UserController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly IUserService UserService;
|
private readonly IUserService UserService;
|
||||||
@ -40,7 +40,7 @@ namespace FirmTracker_Server.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("create")]
|
[HttpPost("create")]
|
||||||
//[Authorize(Roles = Roles.Admin)]
|
[Authorize(Roles = Roles.Admin)]
|
||||||
public ActionResult CreateUser([FromBody] CreateUserDto dto)
|
public ActionResult CreateUser([FromBody] CreateUserDto dto)
|
||||||
{
|
{
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
|
Loading…
Reference in New Issue
Block a user