Archived
2
This commit is contained in:
VLE2FE 2020-08-10 17:10:57 +02:00
parent ed8b549752
commit 2c57d2045c

View File

@ -400,6 +400,7 @@ router.get('/samples', async (req, res, next) => {
csv(_.compact(data.map(e => SampleValidate.output(e, 'refs', measurementFields))), (err, data) => { csv(_.compact(data.map(e => SampleValidate.output(e, 'refs', measurementFields))), (err, data) => {
if (err) return next(err); if (err) return next(err);
res.set('Content-Type', 'text/csv'); res.set('Content-Type', 'text/csv');
res.set('Content-Disposition', 'attachment; filename="samples.csv"');
res.send(data); res.send(data);
}); });
} }