fix:add env in docker compose, save tenantcredit and datafiles is not working

This commit is contained in:
prafull-opensignlabs
2024-08-05 12:43:44 +05:30
parent 11023c6400
commit e71940ecdc
4 changed files with 61 additions and 76 deletions
@@ -34,16 +34,23 @@ async function sendMailProvider(req) {
let Pdf = fs.createWriteStream('test.pdf');
const writeToLocalDisk = () => {
return new Promise((resolve, reject) => {
if (useLocal !== 'true' && publicUrl.protocol !== 'http:') {
if (useLocal !== 'true') {
https.get(req.params.url, async function (response) {
response.pipe(Pdf);
response.on('end', () => resolve('success'));
});
} else {
http.get(req.params.url, async function (response) {
response.pipe(Pdf);
response.on('end', () => resolve('success'));
});
if (publicUrl.protocol === 'http:') {
http.get(req.params.url, async function (response) {
response.pipe(Pdf);
response.on('end', () => resolve('success'));
});
} else {
https.get(req.params.url, async function (response) {
response.pipe(Pdf);
response.on('end', () => resolve('success'));
});
}
}
});
};