diff --git a/backend/app.js b/backend/app.js index 64b035a9ccfcaf2937f06f6b6dfe81adf89a428e..b4e02616d076613058149a28c2af09d0343fa187 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}));