fix: #6184 Minor changes

This commit is contained in:
Guillermo Bonet 2024-01-29 08:14:33 +01:00
parent 567e480e3b
commit 7c80a7bdda
1 changed files with 1 additions and 17 deletions

View File

@ -13,21 +13,6 @@ module.exports = Self => {
description: 'The ticket id',
}
],
returns: [
{
arg: 'body',
type: 'file',
root: true
}, {
arg: 'Content-Type',
type: 'string',
http: {target: 'header'}
}, {
arg: 'Content-Disposition',
type: 'string',
http: {target: 'header'}
}
],
http: {
path: '/cmrEmail',
verb: 'POST'
@ -88,7 +73,7 @@ module.exports = Self => {
const response = await models.Dms.downloadFile(ctx, dms.id);
const email = new Email('cmr', params);
return email.send({
await email.send({
overrideAttachments: true,
attachments: [{
filename: `${ticket.cmrFk}.pdf`,
@ -97,7 +82,6 @@ module.exports = Self => {
});
}
if (tx) await tx.commit();
return;
} catch (e) {
if (tx) await tx.rollback();
throw e;