docs(server-communication): Resolve todo (#1993)
* use latest version of http_in_memory_web_api * remove todo and drop the ?? body term
This commit is contained in:
parent
e2919de78f
commit
6f63e6a390
|
@ -50,9 +50,7 @@ class HeroService {
|
||||||
// #docregion extract-data
|
// #docregion extract-data
|
||||||
dynamic _extractData(Response res) {
|
dynamic _extractData(Response res) {
|
||||||
var body = JSON.decode(res.body);
|
var body = JSON.decode(res.body);
|
||||||
// TODO: https://github.com/adaojunior/http-in-memory-web-api/issues/1
|
return body['data'];
|
||||||
// Once #1 is fixed, drop the `?? body` term:
|
|
||||||
return body['data'] ?? body;
|
|
||||||
}
|
}
|
||||||
// #enddocregion extract-data
|
// #enddocregion extract-data
|
||||||
// #docregion error-handling
|
// #docregion error-handling
|
||||||
|
|
|
@ -11,7 +11,7 @@ dependencies:
|
||||||
http: ^0.11.3+3
|
http: ^0.11.3+3
|
||||||
jsonpadding: ^0.1.0
|
jsonpadding: ^0.1.0
|
||||||
stream_transformers: ^0.3.0+3
|
stream_transformers: ^0.3.0+3
|
||||||
http_in_memory_web_api: ^0.0.1
|
http_in_memory_web_api: ^0.2.0
|
||||||
# #docregion transformers
|
# #docregion transformers
|
||||||
transformers:
|
transformers:
|
||||||
- angular2:
|
- angular2:
|
||||||
|
|
Loading…
Reference in New Issue