fix: shares.list should not return shares for deleted documents
fix: shares.info should not return info for revoked shares closes #1492
This commit is contained in:
parent
3c7dc93982
commit
8550116c6b
@ -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,
|
||||
|
Reference in New Issue
Block a user