Added some nullable regions to get rid of compiler warnings and follow best practices

This commit is contained in:
2020-06-23 17:43:17 +02:00
parent f7c0dc66db
commit a588148dc9
7 changed files with 23 additions and 9 deletions

View File

@@ -16,9 +16,10 @@ namespace ScrumTaskboard.Controllers
public TasksController(TaskContext context)
{
_context = context;
}
// GET: api/tasks
}
// GET: api/tasks
#nullable enable
[HttpGet]
public async Task<ActionResult<IEnumerable<ScrumTask>>> GetTasks([FromQuery]string? title, [FromQuery]int? userstoryid, [FromQuery]int? statusid, [FromQuery]int? assignedtoid, [FromQuery]int? projectid, [FromQuery]ScrumPrio? priority)
{
@@ -51,9 +52,10 @@ namespace ScrumTaskboard.Controllers
return await filtered.ToListAsync();
}
// GET: api/tasks/5
}
#nullable disable
// GET: api/tasks/5
[HttpGet("{id}")]
public async Task<ActionResult<ScrumTask>> GetTask(int id)
{