Fixed a bug where the json object was not being returned and fixed indentation of fetchJSON function.

This commit is contained in:
2017-10-21 00:08:35 +02:00
parent 4297505861
commit 2fd515d997

View File

@@ -15,7 +15,7 @@ import { getCookie } from './Cookie.jsx';
return response; return response;
} }
function parseJSON(response) { response.json(); } function parseJSON(response) { return response.json(); }
@@ -49,4 +49,4 @@ export function fetchJSON(url, method, data) {
}), }),
body: JSON.stringify(data) body: JSON.stringify(data)
}).then(checkStatus).then(parseJSON); }).then(checkStatus).then(parseJSON);
} }