Swap CreatedAtAction for CreatedAtRoute (#1671)

`GetTodo` is the route name so we should use `CreatedAtRoute`.
The tutorial also mention using `CreatedAtRoute`
pull/1676/head
jonathandotchin 2016-07-13 21:50:48 -04:00 committed by Rick Anderson
parent 5456bed4d5
commit 5a0e826101
1 changed files with 1 additions and 1 deletions

View File

@ -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}")]