fix: #6184 Minor changes
This commit is contained in:
parent
567e480e3b
commit
7c80a7bdda
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue