From b71f83fc87412383a7c78376ebf97073e00761ed Mon Sep 17 00:00:00 2001 From: ankushdharkar Date: Thu, 30 Apr 2020 13:18:58 +0530 Subject: [PATCH 1/2] Correcting example on Quickstart > Rendering the Model Using fetch API correctly as depicted on https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch --- markdown/quickstart.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/markdown/quickstart.md b/markdown/quickstart.md index 6bc1b13..4555ae1 100644 --- a/markdown/quickstart.md +++ b/markdown/quickstart.md @@ -58,7 +58,10 @@ export default Route.extend({ model() { return fetch('https://api.github.com/users/tomdale') .then(function(response) { - return response; + return response.json(); + }) + .then(function(data){ + return data; }); } }); From 23f88fcfd9110ab21670dbee9620e701be8256b6 Mon Sep 17 00:00:00 2001 From: ankushdharkar Date: Thu, 30 Apr 2020 13:24:48 +0530 Subject: [PATCH 2/2] Add spacing in function --- markdown/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/quickstart.md b/markdown/quickstart.md index 4555ae1..57a5bc9 100644 --- a/markdown/quickstart.md +++ b/markdown/quickstart.md @@ -60,7 +60,7 @@ export default Route.extend({ .then(function(response) { return response.json(); }) - .then(function(data){ + .then(function(data) { return data; }); }