refactor: refs #7950 Requested changes
gitea/salix/pipeline/pr-dev Build queued... Details

This commit is contained in:
Guillermo Bonet 2024-11-14 07:57:13 +01:00
parent 3c8ef7cdba
commit 9c0af7f7c6
2 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,7 @@ const {Report, Email} = require('vn-print');
module.exports = Self => {
Self.printReport = async function(ctx, id, reportName) {
const args = Object.assign({}, ctx.args);
const args = Object.assign({id}, ctx.args);
const params = {lang: ctx.req.getLocale()};
delete args.ctx;

View File

@ -53,8 +53,7 @@ module.exports = Self => {
if (hasDmsCmr.length)
throw new UserError('This ticket already has a cmr saved');
Object.assign(ctx.args, {id: ticket.$cmrFk});
const response = await models.Cmr.print(ctx, myOptions);
const response = await models.Cmr.print(ctx, ticket.$cmrFk, myOptions);
const pdfStream = Readable.from(Buffer.from(response[0]));
const data = {
workerFk: ctx.req.accessToken.userId,