Skip to content

Commit 20ac7ef

Browse files
Feat: rota protegida teste feito
1 parent 1f479d6 commit 20ac7ef

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Controllers/TaskManagerController.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Todo.Controllers
1111
{
1212
[ApiController]
13+
1314
public class TaskManagerController : ControllerBase
1415
{
1516
private readonly TaskManagerServices _taskManagerServices;
@@ -19,6 +20,7 @@ public TaskManagerController(TaskManagerServices taskManagerServices)
1920
_taskManagerServices = taskManagerServices;
2021
}
2122

23+
[Authorize]
2224
[HttpGet("/TasksToDo")]
2325
public IActionResult Get()
2426
{
@@ -59,6 +61,7 @@ public IActionResult ListAllTasks()
5961
}
6062
}
6163

64+
[Authorize]
6265
[HttpGet("ListTaskByUser/{userId}")]
6366
public IActionResult ListTarefaByUser(
6467
[FromRoute] int userId)

0 commit comments

Comments
 (0)