admin - download emails.csv, thanks to @akhoury for the gist

This commit is contained in:
psychobunny
2014-01-07 14:01:32 -05:00
parent 4912b8a893
commit cfa4256df5
3 changed files with 33 additions and 0 deletions

View File

@@ -159,6 +159,14 @@ var nconf = require('nconf'),
uploadImage(filename, req, res);
});
app.get('/users/csv', function(req, res) {
user.getUsersCSV(function(err, data) {
res.attachment('users.csv');
res.setHeader('Content-Type', 'text/csv');
res.end(data);
});
});
});
function uploadImage(filename, req, res) {