refs #6184 saveCmr #1788

Merged
guillermo merged 58 commits from 6184-saveCmr into dev 2024-02-13 06:47:06 +00:00
1 changed files with 1 additions and 17 deletions
Showing only changes of commit 7c80a7bdda - Show all commits

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);
guillermo marked this conversation as resolved Outdated
Outdated
Review

Si solo se usa una vez params se puede poner directamente el objeto o si se quiere variable poner inmediatamente arriba asi facilita la lectura

Si solo se usa una vez params se puede poner directamente el objeto o si se quiere variable poner inmediatamente arriba asi facilita la lectura
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;