csv fix
This commit is contained in:
parent
ed8b549752
commit
2c57d2045c
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user