Skip to content

Commit

Permalink
Remove revhash dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
NvdLaan committed Oct 17, 2023
1 parent 9823b88 commit b6284dd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions beer-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 0 additions & 8 deletions beer-import/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions beer-import/services/processData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import revisionHash from 'rev-hash'
const uriPrettifier = require('./uriPrettifier')
const updateStores = require('./updateStores')
const moment = require('moment')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b6284dd

Please sign in to comment.