Fixed uncapitalized i in Id for all Controllers
This commit is contained in:
parent
959c43ca1e
commit
f0cf54513f
|
@ -69,7 +69,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
public async Task<IActionResult> PutCategory(int id, ScrumCategory category)
|
public async Task<IActionResult> PutCategory(int id, ScrumCategory category)
|
||||||
{
|
{
|
||||||
// The category's ID must not be changed
|
// The category's ID must not be changed
|
||||||
if (id != category.id)
|
if (id != category.Id)
|
||||||
{
|
{
|
||||||
return BadRequest();
|
return BadRequest();
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
// The new user story has been created and can be called up using the GetUserstory method
|
// The new user story has been created and can be called up using the GetUserstory method
|
||||||
return CreatedAtAction("GetCategory", new { id = category.id }, category);
|
return CreatedAtAction("GetCategory", new { id = category.Id }, category);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/category/1
|
// DELETE: api/category/1
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
public async Task<IActionResult> PutProject(int id, ScrumProject projects)
|
public async Task<IActionResult> PutProject(int id, ScrumProject projects)
|
||||||
{
|
{
|
||||||
// The project's ID must not be changed
|
// The project's ID must not be changed
|
||||||
if (id != projects.id)
|
if (id != projects.Id)
|
||||||
{
|
{
|
||||||
return BadRequest();
|
return BadRequest();
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
// The new project has been created and can be called up using the GetProject method
|
// The new project has been created and can be called up using the GetProject method
|
||||||
return CreatedAtAction("GetProject", new { id = projects.id }, projects);
|
return CreatedAtAction("GetProject", new { id = projects.Id }, projects);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/Project/5
|
// DELETE: api/Project/5
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
public async Task<IActionResult> PutSprint(int id, ScrumSprint sprint)
|
public async Task<IActionResult> PutSprint(int id, ScrumSprint sprint)
|
||||||
{
|
{
|
||||||
// The sprint's ID must not be changed
|
// The sprint's ID must not be changed
|
||||||
if (id != sprint.id)
|
if (id != sprint.Id)
|
||||||
{
|
{
|
||||||
return BadRequest();
|
return BadRequest();
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
// The new sprint has been created and can be called up using the GetSprint method
|
// The new sprint has been created and can be called up using the GetSprint method
|
||||||
return CreatedAtAction("GetSprint", new { id = sprint.id }, sprint);
|
return CreatedAtAction("GetSprint", new { id = sprint.Id }, sprint);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/Sprint/5
|
// DELETE: api/Sprint/5
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
public async Task<IActionResult> PutStatus(int id, ScrumStatus userstory)
|
public async Task<IActionResult> PutStatus(int id, ScrumStatus userstory)
|
||||||
{
|
{
|
||||||
// The status' ID must not be changed
|
// The status' ID must not be changed
|
||||||
if (id != userstory.id)
|
if (id != userstory.Id)
|
||||||
{
|
{
|
||||||
return BadRequest();
|
return BadRequest();
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
// The new status has been created and can be called up using the GetStatus method
|
// The new status has been created and can be called up using the GetStatus method
|
||||||
return CreatedAtAction("GetStatus", new { id = userstory.id }, userstory);
|
return CreatedAtAction("GetStatus", new { id = userstory.Id }, userstory);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/status/1
|
// DELETE: api/status/1
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
public async Task<IActionResult> PutTask(int id, ScrumTask task)
|
public async Task<IActionResult> PutTask(int id, ScrumTask task)
|
||||||
{
|
{
|
||||||
// The task's ID must not be changed
|
// The task's ID must not be changed
|
||||||
if (id != task.id)
|
if (id != task.Id)
|
||||||
{
|
{
|
||||||
return BadRequest();
|
return BadRequest();
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
// The new task has been created and can be called up using the GetTask method
|
// The new task has been created and can be called up using the GetTask method
|
||||||
return CreatedAtAction("GetTask", new { id = task.id }, task);
|
return CreatedAtAction("GetTask", new { id = task.Id }, task);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/tasks/5
|
// DELETE: api/tasks/5
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
public async Task<IActionResult> PutUser(int id, ScrumUser sprint)
|
public async Task<IActionResult> PutUser(int id, ScrumUser sprint)
|
||||||
{
|
{
|
||||||
// The user's ID must not be changed
|
// The user's ID must not be changed
|
||||||
if (id != sprint.id)
|
if (id != sprint.Id)
|
||||||
{
|
{
|
||||||
return BadRequest();
|
return BadRequest();
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
// The new user has been created and can be called up using the GetUser method
|
// The new user has been created and can be called up using the GetUser method
|
||||||
return CreatedAtAction("GetUser", new { id = sprint.id }, sprint);
|
return CreatedAtAction("GetUser", new { id = sprint.Id }, sprint);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/User/5
|
// DELETE: api/User/5
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
public async Task<IActionResult> PutUserstory(int id, ScrumUserstory userstory)
|
public async Task<IActionResult> PutUserstory(int id, ScrumUserstory userstory)
|
||||||
{
|
{
|
||||||
// The userstory's ID must not be changed
|
// The userstory's ID must not be changed
|
||||||
if (id != userstory.id)
|
if (id != userstory.Id)
|
||||||
{
|
{
|
||||||
return BadRequest();
|
return BadRequest();
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ namespace ScrumTaskboard.Controllers
|
||||||
await _context.SaveChangesAsync();
|
await _context.SaveChangesAsync();
|
||||||
|
|
||||||
// The new userstory has been created and can be called up using the GetUserstory method
|
// The new userstory has been created and can be called up using the GetUserstory method
|
||||||
return CreatedAtAction("GetUserstory", new { id = userstory.id }, userstory);
|
return CreatedAtAction("GetUserstory", new { id = userstory.Id }, userstory);
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE: api/userstories/1
|
// DELETE: api/userstories/1
|
||||||
|
|
Loading…
Reference in New Issue