Fix vote export to CSV/TSV & export currency custom field.

This commit is contained in:
Bryan Mutai 2020-05-26 22:56:47 +03:00
parent 18eafe2fec
commit 8c149da9e9
3 changed files with 40 additions and 24 deletions

View file

@ -85,10 +85,10 @@ if (Meteor.isServer) {
? exporter.buildCsv(params.query.delimiter)
: exporter.buildCsv();
res.writeHead(200, {
'Content-Length': body[0].length,
'Content-Length': body.length,
'Content-Type': params.query.delimiter ? 'text/csv' : 'text/tsv',
});
res.write(body[0]);
res.write(body);
res.end();
} else {
res.writeHead(403);