a
This commit is contained in:
parent
dfabadeb6a
commit
64acff9b3a
@ -737,24 +737,6 @@ console.log('Mandamos mail con entrada>>>>>>>>>>>>>>>>>>>>>>>>>>>');
|
||||
}
|
||||
},
|
||||
|
||||
getReservationsExcel: async (req, res, next) => {
|
||||
const params = extractParamsFromRequest(req, res, {});
|
||||
const eventId = params.params.id;
|
||||
const type = params.params.type;
|
||||
const userId = req.user.id;
|
||||
|
||||
const reservations = await eventReservationService._getReservationsExcel(req.user, eventId, null, type, function(result, status){
|
||||
if (result.messenger.code == "S99001") {
|
||||
console.log(result);
|
||||
res.setHeader('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
||||
res.setHeader('Content-Disposition', 'attachment; filename=' + result.data.name);
|
||||
res.attachment(result.data.name);
|
||||
res.download(path.resolve(result.data.path), result.data.name);
|
||||
} else {
|
||||
res.status(status).json(result);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getInscripcionsExcel: async (req, res, next) => {
|
||||
const params = extractParamsFromRequest(req, res, {});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user