diff --git a/beer-import/package.json b/beer-import/package.json index 333245cec..b42e17916 100644 --- a/beer-import/package.json +++ b/beer-import/package.json @@ -20,8 +20,7 @@ "dependencies": { "axios": "^1.4.0", "moment": "^2.29.4", - "mongoose": "^7.4.3", - "rev-hash": "^4.0.0" + "mongoose": "^7.4.3" }, "devDependencies": { "dotenv": "^16.3.1", diff --git a/beer-import/pnpm-lock.yaml b/beer-import/pnpm-lock.yaml index e8c28cad5..aa8c70930 100644 --- a/beer-import/pnpm-lock.yaml +++ b/beer-import/pnpm-lock.yaml @@ -14,9 +14,6 @@ dependencies: mongoose: specifier: ^7.4.3 version: 7.5.0 - rev-hash: - specifier: ^4.0.0 - version: 4.0.0 devDependencies: dotenv: @@ -3506,11 +3503,6 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true - /rev-hash@4.0.0: - resolution: {integrity: sha512-5w/auZRs65pf1AkZIbfICeorQfOCb6XVWaHmDEbkMyjmyRMxck+W0Erdj9zffuBRXxn5cbKfgmWQ9GpgR8dFZQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: false - /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true diff --git a/beer-import/services/processData.js b/beer-import/services/processData.js index e24a71e9a..8d27f468c 100644 --- a/beer-import/services/processData.js +++ b/beer-import/services/processData.js @@ -1,4 +1,3 @@ -import revisionHash from 'rev-hash' const uriPrettifier = require('./uriPrettifier') const updateStores = require('./updateStores') const moment = require('moment') @@ -26,7 +25,7 @@ const processData = (data, stores) => { data[obj].volume = data[obj].korte_name data[obj].rawUri = data[obj].aanbieding_link data[obj].rawValidity = data[obj].einddatum - data[obj].id = revisionHash(data[obj].uid) + data[obj].id = crypto.createHash('md5').update(data[obj].uid).digest('hex').slice(0, 10) delete data[obj].merken_soort_omschrijving delete data[obj].brouwerij_omschrijving delete data[obj].gisting_omschrijving