add console.log
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-03-01 09:09:09 +01:00
parent f6afed485c
commit 4567981724
3 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ async function test() {
jasmine.loadConfig({
spec_dir: '.',
spec_files: backSpecs,
helpers: []
helpers: [],
});
await jasmine.execute();

View File

@ -44,7 +44,7 @@ module.exports = Self => {
try {
const invoiceOut = await Self.findById(id, null, myOptions);
const hasInvoicing = await models.Account.hasRole(userId, 'invoicing', myOptions);
console.log(invoiceOut);
console.log(invoiceOut, !hasInvoicing);
if (invoiceOut.hasPdf && !hasInvoicing)
throw new UserError(`You don't have enough privileges`);

View File

@ -47,7 +47,7 @@ module.exports = Self => {
ids = ids.split(',');
for (let id of ids) {
console.log(zipConfig, totalSize, zipConfig.maxSize);
console.log(zipConfig, totalSize, zipConfig ? zipConfig.maxSize : null);
if (zipConfig && totalSize > zipConfig.maxSize) throw new UserError('Files are too large');
const invoiceOutPdf = await models.InvoiceOut.download(ctx, id, myOptions);
const fileName = extractFileName(invoiceOutPdf[2]);