Merge branch 'dev' into 5172-cliente-impagado
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-02-24 08:34:41 +00:00
commit ed7f3f5d63
111 changed files with 12751 additions and 25370 deletions

View File

@ -74,10 +74,13 @@ module.exports = Self => {
const container = await models.ImageContainer.getContainer(collection);
const rootPath = container.client.root;
const fileSrc = path.join(rootPath, collection, size);
const ext = image.name.substring((image.name.length - 4));
const fileName = ext !== '.png' ? `${image.name}.png` : image.name;
const file = {
path: `${fileSrc}/${image.name}.png`,
path: `${fileSrc}/${fileName}`,
contentType: 'image/png',
name: `${image.name}.png`
name: image.name
};
if (!fs.existsSync(file.path)) return [];

View File

@ -1,6 +1,7 @@
const UserError = require('vn-loopback/util/user-error');
const fs = require('fs-extra');
const path = require('path');
const uuid = require('uuid');
module.exports = Self => {
Self.remoteMethodCtx('upload', {
@ -18,12 +19,6 @@ module.exports = Self => {
type: 'string',
description: 'The collection name',
required: true
},
{
arg: 'fileName',
type: 'string',
description: 'The file name',
required: true
}],
returns: {
type: 'Object',
@ -56,10 +51,12 @@ module.exports = Self => {
const [uploadedFile] = Object.values(uploaded.files).map(file => {
return file[0];
});
const file = await TempContainer.getFile(tempContainer.name, uploadedFile.name);
srcFile = path.join(file.client.root, file.container, file.name);
await models.Image.registerImage(args.collection, srcFile, args.fileName, args.id);
const fileName = `${uuid.v4()}.png`;
await models.Image.registerImage(args.collection, srcFile, fileName, args.id);
} catch (e) {
if (fs.existsSync(srcFile))
await fs.unlink(srcFile);

View File

@ -84,9 +84,8 @@ module.exports = Self => {
const container = await models.ImageContainer.container(collectionName);
const rootPath = container.client.root;
const collectionDir = path.join(rootPath, collectionName);
const file = `${fileName}.png`;
const dstDir = path.join(collectionDir, 'full');
const dstFile = path.join(dstDir, file);
const dstFile = path.join(dstDir, fileName);
const buffer = readChunk.sync(srcFilePath, 0, 12);
const type = imageType(buffer);
@ -102,7 +101,8 @@ module.exports = Self => {
width: bmpData.width,
height: bmpData.height,
channels: 4
}
},
failOn: 'none'
};
}
@ -120,7 +120,7 @@ module.exports = Self => {
const sizes = collection.sizes();
for (let size of sizes) {
const dstDir = path.join(collectionDir, `${size.width}x${size.height}`);
const dstFile = path.join(dstDir, file);
const dstFile = path.join(dstDir, fileName);
const resizeOpts = {
withoutEnlargement: true,
fit: size.crop ? 'cover' : 'inside'

File diff suppressed because one or more lines are too long

View File

@ -228,13 +228,13 @@ INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
(128, 1, 'The Best Bank', 'BBKKESMMMMMM'),
(2100, 1, 'Caixa Bank', 'CAIXESBB');
INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`, `currencyFk`)
INSERT INTO `vn`.`accounting`(`id`, `bank`, `account`, `accountingTypeFk`, `entityFk`, `isActive`, `currencyFk`, `code`)
VALUES
(1, 'Pay on receipt', '5720000001', 3, 128, 1, 1),
(2, 'Cash', '5700000001', 2, 128, 1, 1),
(3, 'Compensation', '4000000000', 8, 128, 1, 1),
(4, 'Transfers', '4000000001', 1, 128, 1, 1),
(3117, 'Caixa Rural d''Algemesi', '5720000000', 8, 2100, 1, 1);
(1, 'Pay on receipt', '5720000001', 3, 128, 1, 1, 'payOnReceipt'),
(2, 'Cash', '5700000001', 2, 128, 1, 1, 'cash'),
(3, 'Compensation', '4000000000', 8, 128, 1, 1, 'compensation'),
(4, 'Transfers', '4000000001', 1, 128, 1, 1, 'transfers'),
(3117, 'Caixa Rural d''Algemesi', '5720000000', 8, 2100, 1, 1, 'cra');
INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`)
VALUES
@ -359,8 +359,8 @@ INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city
(1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
(1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
(1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
(1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL),
(1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL);
(1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'),
(1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others');
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `gestdocFk`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, util.VN_CURDATE(), 1
@ -736,7 +736,7 @@ INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `des
(12, 11, 3, 'Delivery after 10am');
-- FIX for state hours on local, inter_afterInsert
UPDATE vncontrol.inter SET odbc_date = DATE_ADD(util.VN_CURDATE(), INTERVAL -10 SECOND);
-- UPDATE vncontrol.inter SET odbc_date = DATE_ADD(util.VN_CURDATE(), INTERVAL -10 SECOND);
INSERT INTO `vn`.`ticketTracking`(`ticketFk`, `stateFk`, `workerFk`, `created`)
VALUES
@ -1019,16 +1019,11 @@ INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `pric
(33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE()),
(34, 4, 28, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
(35, 4, 29, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
(36, 4, 30, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
(37, 4, 31, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
(36, 4, 30, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
(38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
(39, 1, 32, 'Ranged weapon longbow 2m', 2, 103.49, 0, 0, 0, util.VN_CURDATE());
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
VALUES
(1, 0),
(2, 1);
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
VALUES
(1, 28, 50),
@ -1177,18 +1172,13 @@ INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `cr
('1', '7', '1', util.VN_CURDATE(), '1106'),
('2', '8', '5', util.VN_CURDATE(), '1106');
INSERT INTO `vncontrol`.`accion`(`accion_id`, `accion`)
INSERT INTO `vn`.`saleTracking`(`saleFk`, `isChecked`, `created`, `originalQuantity`, `workerFk`, `id`, `stateFk`)
VALUES
(3, 'ACTION ONE'),
(4, 'ACTIOn TWO');
INSERT INTO `vn`.`saleTracking`(`saleFk`, `isChecked`, `created`, `originalQuantity`, `workerFk`, `actionFk`, `id`, `stateFk`)
VALUES
(1, 0, util.VN_CURDATE(), 5, 55, 3, 1, 14),
(1, 1, util.VN_CURDATE(), 5, 54, 3, 2, 8),
(2, 1, util.VN_CURDATE(), 10, 40, 4, 3, 8),
(3, 1, util.VN_CURDATE(), 2, 40, 4, 4, 8),
(31, 1, util.VN_CURDATE(), -5, 40, 4, 5, 8);
(1, 0, util.VN_CURDATE(), 5, 55, 1, 14),
(1, 1, util.VN_CURDATE(), 5, 54, 2, 8),
(2, 1, util.VN_CURDATE(), 10, 40, 3, 8),
(3, 1, util.VN_CURDATE(), 2, 40, 4, 8),
(31, 1, util.VN_CURDATE(), -5, 40, 5, 8);
INSERT INTO `vn`.`itemBarcode`(`id`, `itemFk`, `code`)
VALUES
@ -1375,7 +1365,7 @@ INSERT INTO `vn`.`recovery`(`id`, `clientFk`, `started`, `finished`, `amount`, `
(3, 1102, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(),INTERVAL 1 MONTH), 50, 7),
(4, 1103, util.VN_CURDATE(), NULL, 50, 7);
INSERT INTO `vn`.`annualAverageInvoiced`(`clientFk`, `invoiced`)
INSERT INTO `bs`.`clientAnnualConsumption`(`clientFk`, `invoiced`)
VALUES
(1101, 1500),
(1102, 100),
@ -1949,7 +1939,7 @@ DROP TEMPORARY TABLE IF EXISTS tmp.worker;
CREATE TEMPORARY TABLE tmp.worker
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT '1111' as 'id', w.id as `workerFk`, 'VNL', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -2 YEAR)), '-12-25') as started, CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)) as ended, '-12-24'), CONCAT('E-46-', RPAD(CONCAT(w.id, 9), 8, w.id)), NULL as `notes`, NULL as `departmentFk`, 23, 1 as `workerBusinessProfessionalCategoryFk`, 1 as `calendarTypeFk`, 1 as `isHourlyLabor`, 1 as `workerBusinessAgreementFk`, 1 as `workcenterFk`
SELECT '1111' as 'id', w.id as `workerFk`, 'VNL', CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -2 YEAR)), '-12-25') as started, CONCAT(YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)), '-12-24') as ended, CONCAT('E-46-', RPAD(CONCAT(w.id, 9), 8, w.id)), NULL as `notes`, NULL as `departmentFk`, 23, 1 as `workerBusinessProfessionalCategoryFk`, 1 as `calendarTypeFk`, 1 as `isHourlyLabor`, 1 as `workerBusinessAgreementFk`, 1 as `workcenterFk`
FROM `vn`.`worker` `w`
WHERE `w`.`id` = 1109;
@ -1985,28 +1975,24 @@ INSERT INTO `vn`.`workerBusinessType` (`id`, `name`, `isFullTime`, `isPermanent`
UPDATE `vn`.`business` b
SET `rate` = 7,
`workerBusinessCategoryFk` = 1,
`workerBusinessTypeFk` = 100,
`amount` = 900.50
WHERE b.id = 1;
UPDATE `vn`.`business` b
SET `rate` = 7,
`workerBusinessCategoryFk` = 1,
`workerBusinessTypeFk` = 100,
`amount` = 1263.03
WHERE b.id = 1106;
UPDATE `vn`.`business` b
SET `rate` = 7,
`workerBusinessCategoryFk` = 1,
`workerBusinessTypeFk` = 100,
`amount` = 2000
WHERE b.id = 1107;
UPDATE `vn`.`business` b
SET `rate` = 7,
`workerBusinessCategoryFk` = 1,
`workerBusinessTypeFk` = 100,
`amount` = 1500
WHERE b.id = 1108;
@ -2020,7 +2006,7 @@ INSERT INTO `vn`.`absenceType` (`id`, `name`, `rgb`, `code`, `holidayEntitlement
(20, 'Furlough', '#97B92F', 'furlough', 1, 1),
(21, 'Furlough half day', '#778899', 'halfFurlough', 0.5, 1);
INSERT INTO `postgresql`.`calendar_employee` (`businessFk`, `calendar_state_id`, `date`)
INSERT INTO `vn`.`calendar` (`businessFk`, `dayOffTypeFk`, `dated`)
VALUES
(1, 6, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -10 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 10 DAY))),
(1106, 1, IF(MONTH(util.VN_CURDATE()) = 12 AND DAY(util.VN_CURDATE()) > 10, DATE_ADD(util.VN_CURDATE(), INTERVAL -10 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL 10 DAY))),
@ -2491,6 +2477,10 @@ REPLACE INTO `vn`.`invoiceIn`(`id`, `serialNumber`,`serial`, `supplierFk`, `issu
(9, 1009, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1242, 1, 442, 1),
(10, 1010, 'R', 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1243, 1, 442, 1);
INSERT INTO `vn`.`invoiceInConfig` (`id`, `retentionRate`, `retentionName`, `sageWithholdingFk`)
VALUES
(1, -2, '2% retention', 2);
INSERT INTO `vn`.`invoiceInDueDay`(`invoiceInFk`, `dueDated`, `bankFk`, `amount`)
VALUES
(1, util.VN_CURDATE(), 1, 336.99),
@ -2730,7 +2720,7 @@ INSERT INTO `util`.`notificationSubscription` (`notificationFk`, `userFk`)
VALUES
(1, 1109),
(1, 1110),
(3, 1109),
(2, 1109),
(1,9),
(1,3);
@ -2784,10 +2774,6 @@ INSERT INTO `vn`.`profileType` (`id`, `name`)
VALUES
(1, 'working');
INSERT INTO `vn`.`newWorkerConfig` (`id`, `street`, `provinceFk`, `companyFk`, `profileTypeFk`, `roleFk`)
VALUES
(1, 'S/ ', 1, 442, 1, 1);
INSERT INTO `salix`.`url` (`appName`, `environment`, `url`)
VALUES
('lilium', 'dev', 'http://localhost:8080/#/'),

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,6 @@ SCHEMAS=(
stock
util
vn
vncontrol
)
IGNORETABLES=(

View File

@ -197,6 +197,7 @@ describe('Ticket Edit sale path', () => {
});
it('should check in the history that logs has been added', async() => {
await page.reload({waitUntil: ['networkidle0', 'domcontentloaded']});
await page.waitToClick(selectors.ticketSales.firstSaleHistoryButton);
await page.waitForSelector(selectors.ticketSales.firstSaleHistory);
const result = await page.countElement(selectors.ticketSales.firstSaleHistory);

View File

@ -63,6 +63,6 @@ describe('Ticket index payout path', () => {
const reference = await page.waitToGetProperty(selectors.clientBalance.firstLineReference, 'innerText');
expect(count).toEqual(4);
expect(reference).toContain('Cash,Albaran: 7, 8Payment');
expect(reference).toContain('Cash, Albaran: 7, 8Payment');
});
});

View File

@ -113,15 +113,6 @@ describe('Travel descriptor path', () => {
expect(message.text).toContain('Data saved!');
});
it('should atempt to clone the travel and its entries using the descriptor menu but receive an error', async() => {
await page.waitToClick(selectors.travelDescriptor.dotMenu);
await page.waitToClick(selectors.travelDescriptor.dotMenuCloneWithEntries);
await page.waitToClick(selectors.travelDescriptor.acceptClonation);
const message = await page.waitForSnackbar();
expect(message.text).toContain('Unable to clone this travel');
});
it('should update the landed date to a future date to enable cloneWithEntries', async() => {
const nextMonth = Date.vnNew();
nextMonth.setMonth(nextMonth.getMonth() + 1);

View File

@ -69,14 +69,6 @@
value-field="code">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="File name"
ng-model="$ctrl.newPhoto.fileName"
required="true">
</vn-input-file>
</vn-horizontal>
</vn-one>
</vn-horizontal>
</tpl-body>

View File

@ -64,8 +64,7 @@ export default class UploadPhoto extends Component {
this.editor = null;
this.newPhoto = {
id: id,
collection: collection,
fileName: id
collection: collection
};
this.$.dialog.show();
}

View File

@ -12,6 +12,7 @@ module.exports = Self => {
});
Self.post = async ctx => {
console.log(ctx.req.body);
return ctx.req.body;
};
};

View File

@ -77,6 +77,11 @@
"type": "belongsTo",
"model": "Ticket",
"foreignKey": "ticketFk"
},
"claimDms": {
"type": "hasMany",
"model": "ClaimDms",
"foreignKey": "claimFk"
}
}
}

View File

@ -10,7 +10,8 @@ describe('Client Create', () => {
socialName: 'Deadpool Marvel',
street: 'Wall Street',
city: 'New York',
businessTypeFk: 'florist'
businessTypeFk: 'florist',
provinceFk: 1
};
beforeAll(async() => {

View File

@ -68,7 +68,7 @@ class Controller extends Dialog {
this.receipt.description.push(accountingType.receiptDescription);
if (this.originalDescription)
this.receipt.description.push(this.originalDescription);
this.receipt.description.join(', ');
this.receipt.description = this.receipt.description.join(', ');
}
this.maxAmount = accountingType && accountingType.maxAmount;

View File

@ -38,7 +38,7 @@ describe('Client', () => {
}
};
expect(controller.receipt.description.join(',')).toEqual('Cash,Albaran: 1, 2');
expect(controller.receipt.description).toEqual('Cash, Albaran: 1, 2');
});
});

View File

@ -5,10 +5,6 @@ import './style.scss';
class Controller extends Section {
constructor($element, $, vnEmail) {
super($element, $);
this.clientSample = {
clientFk: this.$params.id,
companyId: this.vnConfig.companyFk
};
this.vnEmail = vnEmail;
}
@ -19,10 +15,8 @@ class Controller extends Section {
set client(value) {
this._client = value;
if (value) {
this.clientSample.recipient = value.email;
this.getWorkerEmail();
}
if (value)
this.setClientSample(value);
}
get companyId() {
@ -119,12 +113,17 @@ class Controller extends Section {
.then(() => this.$state.go('client.card.sample.index'));
}
getWorkerEmail() {
setClientSample(client) {
const userId = window.localStorage.currentUserWorkerId;
const params = {filter: {where: {userFk: userId}}};
this.$http.get('EmailUsers', params).then(res => {
const [worker] = res && res.data;
this.clientSample.replyTo = worker.email;
this.clientSample = {
clientFk: this.$params.id,
companyId: this.vnConfig.companyFk,
recipient: client.email,
replyTo: worker.email
};
});
}
}

View File

@ -191,15 +191,19 @@ describe('Client', () => {
});
});
describe('getWorkerEmail()', () => {
describe('setClientSample()', () => {
it(`should perform a query and then set the replyTo property to the clientSample object`, () => {
const client = {email: 'test@example.com'};
const expectedEmail = 'batman@arkhamcity.com';
const serializedParams = $httpParamSerializer({filter: {where: {}}});
$httpBackend.expect('GET', `EmailUsers?${serializedParams}`).respond([{email: expectedEmail}]);
controller.getWorkerEmail();
controller.setClientSample(client);
$httpBackend.flush();
expect(controller.clientSample.replyTo).toEqual(expectedEmail);
expect(controller.clientSample.clientFk).toEqual(controller.$params.id);
expect(controller.clientSample.recipient).toEqual(client.email);
expect(controller.clientSample.companyId).toEqual(controller.vnConfig.companyFk);
});
});
});

View File

@ -1,6 +1,7 @@
const https = require('https');
const fs = require('fs-extra');
const path = require('path');
const uuid = require('uuid');
module.exports = Self => {
Self.remoteMethod('downloadImages', {
@ -46,10 +47,8 @@ module.exports = Self => {
if (!image) return;
const srcFile = image.url;
const fileName = srcFile.replace(/\.|\/|:|\?|\\|=|%/g, '');
const file = `${fileName}.png`;
const filePath = path.join(tempPath, file);
const fileName = `${uuid.v4()}.png`;
const filePath = path.join(tempPath, fileName);
const imageUrl = image.url.replace('http://', 'https://');
https.get(imageUrl, async response => {

Some files were not shown because too many files have changed in this diff Show More