Skip to content

Commit

Permalink
print id similarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Zemotacqy committed Oct 27, 2019
1 parent c0a2cb0 commit e14891a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"mongoose": "^5.7.7",
"morgan": "^1.9.1",
"multer": "^1.4.2",
"nodemailer": "^6.3.1",
"nodemon": "^1.19.4"
}
}
17 changes: 15 additions & 2 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const jimp = require('jimp');
const spawn = require('child_process').spawn;
const lost = require('./../models/losts.js');
const found = require('./../models/found.js');
const nodemailer = require('nodemailer');

const storage = multer.diskStorage({
destination: function (req, file, cb) {
Expand Down Expand Up @@ -67,7 +68,7 @@ router.post('/uploadlost', upload.array("lostImage", 10), (req, res, next) => {
const newimage = new lost({
_id: mongooseId,
label: labelname,
email : req.body.email
email : req.body.email
});


Expand Down Expand Up @@ -138,7 +139,19 @@ router.post('/uploadfound', upload.array("lostImage", 10), (req, res, next) => {
// console.log(data.toString('utf8'));
var temp = data.toString('utf8');
if(temp.length > 5) id = temp;
else similarity = temp;
else {
similarity = temp;
console.log(id, similarity);
// var transporter = nodemailer.createTransport({
// service: 'gmail',
// auth: {
// user: config.email.username,
// pass: config.email.password
// },
// secure: true,
// pool: true
// });
}
});

newfimage
Expand Down

0 comments on commit e14891a

Please sign in to comment.