dont use useless wrapped dep, just use imghash on its own

jschan
Thomas Lynch 3 years ago
parent 76f0ba36f2
commit 825c5e7d61
No known key found for this signature in database
GPG Key ID: FBAB081F9B6E14B2
  1. 4
      helpers/imagehash.js
  2. 20187
      package-lock.json
  3. 3
      package.json

@ -1,6 +1,6 @@
'use strict';
const imageHash = require('node-image-hash').hash
const imageHash = require('imghash').hash
, config = require(__dirname+'/../config.js');
module.exports = async (req, res, next) => {
@ -11,7 +11,7 @@ module.exports = async (req, res, next) => {
const mainType = req.files.file[i].mimetype.split('/')[0];
if (mainType === 'image' || mainType === 'video') {
hashPromises.push(imageHash(req.files.file[i].tempFilePath, 8, 'hex').then(res => {
req.files.file[i].phash = res.hash;
req.files.file[i].phash = res;
}));
}
}

20187
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -33,12 +33,11 @@
"highlight.js": "^11.2.0",
"i18n-iso-countries": "^6.8.0",
"iconv-lite": "^0.6.3",
"imghash": "0.0.9",
"imghash": "^0.0.9",
"ioredis": "^4.28.0",
"ip6addr": "^0.2.3",
"mongodb": "^4.0.1",
"node-fetch": "^3.0.0",
"node-image-hash": "^1.1.0",
"path": "^0.12.7",
"pm2": "^5.1.0",
"pug": "^3.0.2",

Loading…
Cancel
Save