Skip to content

Commit 6d19d86

Browse files
Fix: runnin without error reference between types
1 parent ae28522 commit 6d19d86

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

Controllers/CategorieTaskController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Microsoft.AspNetCore.Authorization;
22
using Microsoft.AspNetCore.Mvc;
33
using Todo.Data;
4+
using Todo.Domain;
45
using Todo.Models;
56
using Todo.Services;
67

@@ -35,7 +36,7 @@ public IActionResult Get()
3536

3637
[Authorize]
3738
[HttpPost("CreateCategorieTask")]
38-
public IActionResult CreateCategorieTask([FromBody] CategorieTaskEntity model)
39+
public IActionResult CreateCategorieTask([FromBody] CategorieTaskModel model)
3940
{
4041
try
4142
{
@@ -50,7 +51,7 @@ public IActionResult CreateCategorieTask([FromBody] CategorieTaskEntity model)
5051

5152
[Authorize]
5253
[HttpPut("UpdateCategorieTask")]
53-
public IActionResult UpdateCategorieTask([FromBody] CategorieTaskEntity model)
54+
public IActionResult UpdateCategorieTask([FromBody] CategorieTaskModel model)
5455
{
5556
try
5657
{

Controllers/LoginController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Microsoft.AspNetCore.Authorization;
22
using Microsoft.AspNetCore.Mvc;
33
using Todo.Data;
4+
using Todo.Domain;
45
using Todo.Models;
56
using Todo.Services;
67

Services/LoginService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Security.Claims;
55
using System.Text;
66
using Todo.Data;
7+
using Todo.Domain;
78
using Todo.Models;
89

910

Services/TaskManagerServices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public IActionResult GetTasksByUser (int userId)
9595

9696
public IActionResult GetById(int id)
9797
{
98-
TaskModel task = context.Tasks.FirstOrDefault(x => x.Id == id);
98+
TaskEntity task = context.Tasks.FirstOrDefault(x => x.Id == id);
9999

100100
if (task == null) return new NotFoundResult();
101101

0 commit comments

Comments
 (0)