diff --git a/index.js b/index.js index 185da3a..502b8cf 100644 --- a/index.js +++ b/index.js @@ -34,11 +34,10 @@ app.get('/about', (req, res) => { }) app.post('/search', (req, res) => { - console.log(req.body.title) MongoClient.connect("mongodb://localhost:27017/yahoo",(err, client) => { if (err) throw err var query = {title: new RegExp(req.body.title, 'gmi') } - temp = client.db().collection("questions").find(query, {projection: {_id: 0}}).toArray(function(err, data) { + temp = client.db().collection("questions").find(query).toArray(function(err, data) { res.render('index', {data: data}) client.close() }) diff --git a/views/index.handlebars b/views/index.handlebars index a99d662..faf2f00 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -5,10 +5,10 @@
{{this.description}}
@@ -20,21 +20,3 @@ {{/each}}{{this.description}}
{{this.category}}