Added some nullable regions to get rid of compiler warnings and follow best practices
This commit is contained in:
parent
f7c0dc66db
commit
a588148dc9
@ -19,6 +19,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/category
|
// GET: api/category
|
||||||
|
#nullable enable
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<ActionResult<IEnumerable<ScrumCategory>>> GetCategory([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery] string? color)
|
public async Task<ActionResult<IEnumerable<ScrumCategory>>> GetCategory([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery] string? color)
|
||||||
{
|
{
|
||||||
@ -40,6 +41,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
|
|
||||||
return await filtered.ToListAsync();
|
return await filtered.ToListAsync();
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
// GET: api/category/1
|
// GET: api/category/1
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
|
@ -19,6 +19,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/projects
|
// GET: api/projects
|
||||||
|
#nullable enable
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<ActionResult<IEnumerable<ScrumProject>>> GetProject([FromQuery]string? title, [FromQuery]bool? isprivate)
|
public async Task<ActionResult<IEnumerable<ScrumProject>>> GetProject([FromQuery]string? title, [FromQuery]bool? isprivate)
|
||||||
{
|
{
|
||||||
@ -35,6 +36,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
|
|
||||||
return await filtered.ToListAsync();
|
return await filtered.ToListAsync();
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
// GET: api/projects/5
|
// GET: api/projects/5
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
|
@ -16,9 +16,10 @@ namespace ScrumTaskboard.Controllers
|
|||||||
public SprintsController(TaskContext context)
|
public SprintsController(TaskContext context)
|
||||||
{
|
{
|
||||||
_context = context;
|
_context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/sprint
|
// GET: api/sprint
|
||||||
|
#nullable enable
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<ActionResult<IEnumerable<ScrumSprint>>> GetSprint([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery]DateTime? startDate, [FromQuery]DateTime? endDate)
|
public async Task<ActionResult<IEnumerable<ScrumSprint>>> GetSprint([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery]DateTime? startDate, [FromQuery]DateTime? endDate)
|
||||||
{
|
{
|
||||||
@ -43,6 +44,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
|
|
||||||
return await filtered.ToListAsync();
|
return await filtered.ToListAsync();
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
// GET: api/sprint/5
|
// GET: api/sprint/5
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
|
@ -18,6 +18,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/status
|
// GET: api/status
|
||||||
|
#nullable enable
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<ActionResult<IEnumerable<ScrumStatus>>> GetStatus([FromQuery]string? title)
|
public async Task<ActionResult<IEnumerable<ScrumStatus>>> GetStatus([FromQuery]string? title)
|
||||||
{
|
{
|
||||||
@ -30,6 +31,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
|
|
||||||
return await filtered.ToListAsync();
|
return await filtered.ToListAsync();
|
||||||
}
|
}
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
// GET: api/status/1
|
// GET: api/status/1
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
|
@ -16,9 +16,10 @@ namespace ScrumTaskboard.Controllers
|
|||||||
public TasksController(TaskContext context)
|
public TasksController(TaskContext context)
|
||||||
{
|
{
|
||||||
_context = context;
|
_context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/tasks
|
// GET: api/tasks
|
||||||
|
#nullable enable
|
||||||
[HttpGet]
|
[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)
|
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();
|
return await filtered.ToListAsync();
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
// GET: api/tasks/5
|
|
||||||
|
// GET: api/tasks/5
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public async Task<ActionResult<ScrumTask>> GetTask(int id)
|
public async Task<ActionResult<ScrumTask>> GetTask(int id)
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/sprint
|
// GET: api/sprint
|
||||||
|
#nullable enable
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<ActionResult<IEnumerable<ScrumUser>>> GetUser([FromQuery]string? name)
|
public async Task<ActionResult<IEnumerable<ScrumUser>>> GetUser([FromQuery]string? name)
|
||||||
{
|
{
|
||||||
@ -29,6 +30,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
|
|
||||||
return await filtered.ToListAsync();
|
return await filtered.ToListAsync();
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
// GET: api/sprint/5
|
// GET: api/sprint/5
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
|
@ -19,6 +19,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: api/userstories
|
// GET: api/userstories
|
||||||
|
#nullable enable
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<ActionResult<IEnumerable<ScrumUserstory>>> GetUserstory([FromQuery]string? title, [FromQuery]int? statusid, [FromQuery]int? categoryid, [FromQuery]int? createdbyid, [FromQuery]int? projectid, [FromQuery]int? sprintid, [FromQuery]ScrumPrio? priority)
|
public async Task<ActionResult<IEnumerable<ScrumUserstory>>> GetUserstory([FromQuery]string? title, [FromQuery]int? statusid, [FromQuery]int? categoryid, [FromQuery]int? createdbyid, [FromQuery]int? projectid, [FromQuery]int? sprintid, [FromQuery]ScrumPrio? priority)
|
||||||
{
|
{
|
||||||
@ -56,6 +57,7 @@ namespace ScrumTaskboard.Controllers
|
|||||||
|
|
||||||
return await filtered.ToListAsync();
|
return await filtered.ToListAsync();
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
// GET: api/userstories/1
|
// GET: api/userstories/1
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user