From 274e810ff17d4ebed0d1ea2e25d059f0d0600409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?In=C3=A8s=20Yeterian?= <ines.yeterian@student-cs.fr> Date: Tue, 11 Jan 2022 16:45:02 +0100 Subject: [PATCH] talking to mongodb, god knows where this is leading us --- backend/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/app.js b/backend/app.js index 64b035a..b4e0261 100644 --- a/backend/app.js +++ b/backend/app.js @@ -21,6 +21,10 @@ db.on("error", console.error.bind(console, "connection error:")); db.once("open", function() { console.log("on est connecté!"); }); + + +toucans.updateMany({}, {"$set":{"toucan_id": { "$concat": ["$title", "-", { $year: "$date" }]}}}); + app.use(cors()); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({extended: true})); -- GitLab