Cleaning code; Updating spotify POST requests and LastFM signed to use fetch

This commit is contained in:
James Barnsley
2019-09-19 16:36:49 +12:00
parent 6415074287
commit 5d30347f28
13 changed files with 10052 additions and 5518 deletions

View File

@ -47,9 +47,9 @@ const request = (dispatch, getState, endpoint, method = 'GET', data = false, cac
// only if we've got data do we add it to the request (this prevents appending of "&false" to the URL)
if (data) {
if (typeof (data) === 'string') {
config.data = data;
config.body = data;
} else {
config.data = JSON.stringify(data);
config.body = JSON.stringify(data);
}
}