Skip to content
This repository was archived by the owner on Jan 23, 2020. It is now read-only.

Commit 73a5d8e

Browse files
authored
Update TodoController.cs
Data received from API is in lowercase. After serialization to JSON it is still lowercase and ["Title"] throws an exception. It is hard to find out what is wrong without debugging.
1 parent 816c426 commit 73a5d8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WebApp-WebAPI-OpenIdConnect-DotNet/Controllers/TodoController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public async Task<IActionResult> Index()
5353
foreach (Dictionary<String, String> responseElement in responseElements)
5454
{
5555
TodoItem newItem = new TodoItem();
56-
newItem.Title = responseElement["Title"];
57-
newItem.Owner = responseElement["Owner"];
56+
newItem.Title = responseElement["title"];
57+
newItem.Owner = responseElement["owner"];
5858
itemList.Add(newItem);
5959
}
6060

0 commit comments

Comments
 (0)