Skip to content

Commit

Permalink
#56 Patch dashboard annotations issue
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Dec 18, 2020
1 parent dd942df commit a16ca45
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/pages/api/annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ const handler = async (req, res) => {
.collection('annotations')
.find({
'permissions.private': false,
'permissions.sharedTo': undefined,
'permissions.groups': { $in: groupIds },
$or: [
{ 'permissions.sharedTo': { $in: [token.id] } },
{ 'permissions.groups': { $in: groupIds } },
],
})
.limit(parseInt(limit, 10))
.toArray();
Expand All @@ -65,8 +67,10 @@ const handler = async (req, res) => {
.collection('annotations')
.find({
'permissions.private': false,
'permissions.sharedTo': undefined,
'permissions.groups': { $in: groupIds },
$or: [
{ 'permissions.sharedTo': { $in: [token.id] } },
{ 'permissions.groups': { $in: groupIds } },
],
})
.toArray();
res.status(200).json({ annotations: arr });
Expand Down

0 comments on commit a16ca45

Please sign in to comment.