From dbf5953d69f55e5f7bb866318fd01aff6de2a98b Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 14 Nov 2024 10:47:39 +0100 Subject: [PATCH] refactor: refs #8002 use loop wip --- back/methods/osticket/sendToSupport.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/back/methods/osticket/sendToSupport.js b/back/methods/osticket/sendToSupport.js index d05f1a82e..dabd35f80 100644 --- a/back/methods/osticket/sendToSupport.js +++ b/back/methods/osticket/sendToSupport.js @@ -32,21 +32,23 @@ module.exports = Self => { const userId = ctx.req.accessToken.userId; const emailUser = await Self.app.models.EmailUser.findById(userId, {fields: ['email']}); - const {code, message, path, request, status, statusText, config: errConfig, name} = additionalData; let html = `

Motivo: ${reason}

`; html += `

Usuario: ${userId} ${emailUser.email}

`; html += `

Additional Data:

`; - html += `'; + html += ''; + const {message, path, name} = additionalData; await smtp.send({ to: `${config.app.reportEmail}, ${emailUser.email}`, subject: `[Support-Salix] ${path} ${name}: ${message}`,