Swap CreatedAtAction for CreatedAtRoute (#1671)
`GetTodo` is the route name so we should use `CreatedAtRoute`. The tutorial also mention using `CreatedAtRoute`pull/1676/head
parent
5456bed4d5
commit
5a0e826101
|
@ -38,7 +38,7 @@ namespace TodoApi.Controllers
|
|||
return BadRequest();
|
||||
}
|
||||
TodoItems.Add(item);
|
||||
return CreatedAtAction("GetTodo", new { id = item.Key }, item);
|
||||
return CreatedAtRoute("GetTodo", new { id = item.Key }, item);
|
||||
}
|
||||
|
||||
[HttpPut("{id}")]
|
||||
|
|
Loading…
Reference in New Issue