generate practice summary report; send report to frontend
This commit is contained in:
@@ -128,10 +128,13 @@ const checkProcessingStatus = (req, res) => {
|
||||
|
||||
const getPracticeSummaryReport = (req, res) => {
|
||||
getMemberPracticeSummaryReport()
|
||||
.then(() => {
|
||||
res.send();
|
||||
.then((result) => {
|
||||
const pathToDownloadFile = `${__dirname}/../${result.reportPath}`;
|
||||
res.download(pathToDownloadFile);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('Error - Member Practice Summary Report');
|
||||
console.log(error);
|
||||
res.status(500).send(error);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user