fix: backTest
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-12-20 10:40:39 +01:00
parent b7100873a4
commit 8b5f5d928e
2 changed files with 2 additions and 2 deletions

View File

@ -37,12 +37,12 @@ module.exports = Self => {
Self.downloadZip = async function(ctx, ids, options) { Self.downloadZip = async function(ctx, ids, options) {
const models = Self.app.models; const models = Self.app.models;
const myOptions = {}; const myOptions = {};
const zipConfig = await models.ZipConfig.findOne(null, myOptions);
const zip = new JSZip(); const zip = new JSZip();
if (typeof options == 'object') if (typeof options == 'object')
Object.assign(myOptions, options); Object.assign(myOptions, options);
const zipConfig = await models.ZipConfig.findOne(null, myOptions);
let totalSize = 0; let totalSize = 0;
ids = ids.split(','); ids = ids.split(',');

View File

@ -3,7 +3,7 @@ const UserError = require('vn-loopback/util/user-error');
describe('InvoiceOut downloadZip()', () => { describe('InvoiceOut downloadZip()', () => {
const userId = 9; const userId = 9;
const invoiceIds = [1, 2]; const invoiceIds = '1,2';
const ctx = { const ctx = {
req: { req: {