diff --git a/modules/route/back/methods/route/generateCmrPdf.js b/modules/route/back/methods/route/generateCmrPdf.js index 236c11508..56b8f0f2f 100644 --- a/modules/route/back/methods/route/generateCmrPdf.js +++ b/modules/route/back/methods/route/generateCmrPdf.js @@ -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,