From 53ecdd448bd882987e94b47583018b88bc96f7a6 Mon Sep 17 00:00:00 2001 From: Beppe Vanrolleghem Date: Mon, 28 Jan 2019 13:54:35 +0100 Subject: [PATCH] bootstrap is weird --- index.js | 3 +-- views/index.handlebars | 22 ++-------------------- 2 files changed, 3 insertions(+), 22 deletions(-) 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 @@
-
+

description

{{this.description}}

@@ -20,21 +20,3 @@ {{/each}}
- - - - -
- -
-
-

- {{this.title}} -

-
-
-

description

{{this.description}}

category

{{this.category}}

-
- -
-