Added paranoid, debugging and fixes to document deleting on atlas collections

This commit is contained in:
Jori Lallo
2016-08-14 10:50:42 +02:00
parent bcb39d823f
commit 792def3249
8 changed files with 97 additions and 28 deletions

View File

@@ -58,6 +58,7 @@ const Document = sequelize.define('document', {
},
},
}, {
paranoid: true,
hooks: {
beforeValidate: (doc) => {
doc.urlId = randomstring.generate(15);