diff --git a/server/api/shares.js b/server/api/shares.js index fcb74c1c0..78cdacf1c 100644 --- a/server/api/shares.js +++ b/server/api/shares.js @@ -21,10 +21,12 @@ router.post("shares.info", auth(), async (ctx) => { where: id ? { id, + revokedAt: { [Op.eq]: null }, } : { documentId, userId: user.id, + revokedAt: { [Op.eq]: null }, }, }); if (!share) { @@ -63,6 +65,7 @@ router.post("shares.list", auth(), pagination(), async (ctx) => { { model: Document, required: true, + paranoid: true, as: "document", where: { collectionId: collectionIds,