requester should resolve response.text if response is not json, better tests for csv export

This commit is contained in:
Matteo Pagliazzi
2016-01-28 11:30:53 +01:00
parent 6d38caf78b
commit 1369327c44
3 changed files with 17 additions and 4 deletions

View File

@@ -280,7 +280,7 @@ api.exportChallengeCsv = {
.exec(),
Tasks.Task.find({'challenge.id': challengeId, userId: {$exists: true}})
.sort({userId: 1, _id: 1}).select('userId type text value notes').lean().exec(),
.sort({userId: 1, text: 1}).select('userId type text value notes').lean().exec(),
]);
let resArray = members.map(member => [member._id, member.profile.name]);