Wiping more information

Ensuring documents and collections created by user still load
This commit is contained in:
Tom Moor
2018-07-10 19:47:15 -07:00
parent 068f199bb0
commit 22d02da2f9
2 changed files with 15 additions and 9 deletions

View File

@ -141,8 +141,8 @@ Document.associate = models => {
{
include: [
{ model: models.Collection, as: 'collection' },
{ model: models.User, as: 'createdBy' },
{ model: models.User, as: 'updatedBy' },
{ model: models.User, as: 'createdBy', paranoid: false },
{ model: models.User, as: 'updatedBy', paranoid: false },
],
where: {
publishedAt: {
@ -156,8 +156,8 @@ Document.associate = models => {
Document.addScope('withUnpublished', {
include: [
{ model: models.Collection, as: 'collection' },
{ model: models.User, as: 'createdBy' },
{ model: models.User, as: 'updatedBy' },
{ model: models.User, as: 'createdBy', paranoid: false },
{ model: models.User, as: 'updatedBy', paranoid: false },
],
});
Document.addScope('withViews', userId => ({