fix: undefined uid when downloading posts

This commit is contained in:
Barış Soner Uşaklı
2020-05-15 10:52:04 -04:00
parent 5e3760d276
commit bdda022238

View File

@@ -104,7 +104,7 @@ userController.exportPosts = async function (req, res) {
checkSchemaDifferences: false, checkSchemaDifferences: false,
emptyFieldValue: '', emptyFieldValue: '',
}); });
res.set('Content-Type', 'text/csv').set('Content-Disposition', 'attachment; filename="' + req.params.uid + '_posts.csv"').send(csv); res.set('Content-Type', 'text/csv').set('Content-Disposition', 'attachment; filename="' + req.locals.uid + '_posts.csv"').send(csv);
}; };
userController.exportUploads = function (req, res, next) { userController.exportUploads = function (req, res, next) {