From 6d19d86fbe92cbb6d1a87c888fb40c097c2dd32d Mon Sep 17 00:00:00 2001 From: Romulo Queiroz Date: Fri, 20 Jun 2025 16:02:48 -0300 Subject: [PATCH] Fix: runnin without error reference between types --- Controllers/CategorieTaskController.cs | 5 +++-- Controllers/LoginController.cs | 1 + Services/LoginService.cs | 1 + Services/TaskManagerServices.cs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Controllers/CategorieTaskController.cs b/Controllers/CategorieTaskController.cs index 16d18c8..8f8166b 100644 --- a/Controllers/CategorieTaskController.cs +++ b/Controllers/CategorieTaskController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Todo.Data; +using Todo.Domain; using Todo.Models; using Todo.Services; @@ -35,7 +36,7 @@ public IActionResult Get() [Authorize] [HttpPost("CreateCategorieTask")] - public IActionResult CreateCategorieTask([FromBody] CategorieTaskEntity model) + public IActionResult CreateCategorieTask([FromBody] CategorieTaskModel model) { try { @@ -50,7 +51,7 @@ public IActionResult CreateCategorieTask([FromBody] CategorieTaskEntity model) [Authorize] [HttpPut("UpdateCategorieTask")] - public IActionResult UpdateCategorieTask([FromBody] CategorieTaskEntity model) + public IActionResult UpdateCategorieTask([FromBody] CategorieTaskModel model) { try { diff --git a/Controllers/LoginController.cs b/Controllers/LoginController.cs index a2df7cf..02557a2 100644 --- a/Controllers/LoginController.cs +++ b/Controllers/LoginController.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Todo.Data; +using Todo.Domain; using Todo.Models; using Todo.Services; diff --git a/Services/LoginService.cs b/Services/LoginService.cs index 358a95b..05f10a1 100644 --- a/Services/LoginService.cs +++ b/Services/LoginService.cs @@ -4,6 +4,7 @@ using System.Security.Claims; using System.Text; using Todo.Data; +using Todo.Domain; using Todo.Models; diff --git a/Services/TaskManagerServices.cs b/Services/TaskManagerServices.cs index 385c503..9e5f4f4 100644 --- a/Services/TaskManagerServices.cs +++ b/Services/TaskManagerServices.cs @@ -95,7 +95,7 @@ public IActionResult GetTasksByUser (int userId) public IActionResult GetById(int id) { - TaskModel task = context.Tasks.FirstOrDefault(x => x.Id == id); + TaskEntity task = context.Tasks.FirstOrDefault(x => x.Id == id); if (task == null) return new NotFoundResult();