diff --git a/common/utils/ajax-stream.js b/common/utils/ajax-stream.js index 0e02ba8ad3..665e23348c 100644 --- a/common/utils/ajax-stream.js +++ b/common/utils/ajax-stream.js @@ -276,7 +276,8 @@ export function postJSON$(url, body) { 'Content-Type': 'application/json', 'Accept': 'application/json' } - }); + }) + .map(({ response }) => response); } /** @@ -304,7 +305,5 @@ export function getJSON$(url) { 'Content-Type': 'application/json', 'Accept': 'application/json' } - }).map(function(x) { - return x.response; - }); + }).map(({ response }) => response); }