From 1ccc09ed76b9b4b9f525c0a3801108d874943e68 Mon Sep 17 00:00:00 2001 From: clement callaert Date: Sun, 5 Nov 2023 20:05:18 +0100 Subject: [PATCH] mongodb --- routes/posts.js | 1 + views/hotLine.ejs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/posts.js b/routes/posts.js index 605a251..a62b42c 100644 --- a/routes/posts.js +++ b/routes/posts.js @@ -61,6 +61,7 @@ router.post('/commandeCrepe', async function (req, res) { prenom: prenom, finish: false } + await db.getDb().collection('commandes').insertOne(crepeCommande); res.redirect("/hotLine"); }) diff --git a/views/hotLine.ejs b/views/hotLine.ejs index 1ec8e4d..cf851d0 100644 --- a/views/hotLine.ejs +++ b/views/hotLine.ejs @@ -35,7 +35,7 @@

Commander

-
+