fix: issue-2956 (#2957)

This commit is contained in:
Nan Yu
2022-01-19 18:24:25 -08:00
committed by GitHub
parent 8bced69828
commit 266f8c96c4
5 changed files with 9 additions and 3 deletions

View File

@@ -168,6 +168,7 @@ router.post("shares.update", auth(), async (ctx) => {
const { user } = ctx.state;
const team = await Team.findByPk(user.teamId);
authorize(user, "share", team);
// fetch the share with document and collection.
const share = await Share.scope({
method: ["withCollection", user.id],