From c670cdfaab553f4e84f16175410c560ac22e6c01 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sat, 9 Jan 2016 23:05:53 -0800 Subject: [PATCH] Fix postJSON$ should return response --- common/utils/ajax-stream.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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); }