feat: #6184 Requested changes
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Guillermo Bonet 2024-01-18 07:46:58 +01:00
parent a486b7f2d4
commit ce5a2ada62
1 changed files with 0 additions and 6 deletions

View File

@ -34,19 +34,13 @@ module.exports = Self => {
});
Self.generateCmrPdf = async function(ctx, id, options) {
const models = Self.app.models;
const myOptions = {};
if (typeof options == 'object')
Object.assign(myOptions, options);
const zipConfig = await models.ZipConfig.findOne(null, myOptions);
let totalSize = 0;
const baseUrl = (await Self.app.models.Url.getUrl()).replace('#!', 'api');
if (zipConfig && totalSize > zipConfig.maxSize) throw new UserError('Files are too large');
const response = await axios.get(
`${baseUrl}Routes/${id}/cmr`, {
...myOptions,