fix: Server error when loading documents.info with shareId and user token and child documents shared

closes #2527
This commit is contained in:
Tom Moor
2021-09-01 23:38:43 -07:00
parent 476b5e03f9
commit a3df9e868f
2 changed files with 35 additions and 35 deletions

View File

@ -541,8 +541,7 @@ async function loadDocument({
const canReadDocument = can(user, "read", document);
if (canReadDocument) {
await share.update({ lastAccessedAt: new Date() });
return { document, share, collection };
return { document, share, collection: document.collection };
}
// "published" === on the public internet.