Skip to content
Snippets Groups Projects
Commit 28d20042 authored by Inès Yeterian's avatar Inès Yeterian
Browse files

retour en arrière

parent 13a91ad4
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ var toucanSchema = new Schema ({ ...@@ -15,7 +15,7 @@ var toucanSchema = new Schema ({
toucanSchema.index({date:-1},{unique: true}); toucanSchema.index({date:-1},{unique: true});
var toucans = mongoose.model("Toucan",toucanSchema); var toucans = mongoose.model("Toucan",toucanSchema);
try{ /* try{
await toucans.updateMany( {},{$set: { toucan_id : 'example'} }, { multi: true }, function (err, docs) { await toucans.updateMany( {},{$set: { toucan_id : 'example'} }, { multi: true }, function (err, docs) {
if (err){ if (err){
console.log(err) console.log(err)
...@@ -25,6 +25,6 @@ await toucans.updateMany( {},{$set: { toucan_id : 'example'} }, { multi: true }, ...@@ -25,6 +25,6 @@ await toucans.updateMany( {},{$set: { toucan_id : 'example'} }, { multi: true },
} }
}); });
} }
catch(e) { console.error(e) }; catch(e) { console.error(e) }; */
module.exports = toucans; module.exports = toucans;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment