mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
requester should resolve response.text if response is not json, better tests for csv export
This commit is contained in:
@@ -51,7 +51,8 @@ function _requestMaker (user, method, additionalSets) {
|
||||
reject(parsedError);
|
||||
}
|
||||
|
||||
resolve(response.body);
|
||||
let contentType = response.headers['content-type'] || '';
|
||||
resolve(contentType.indexOf('json') !== -1 ? response.body : response.text);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user