Skip to content

Commit

Permalink
Merge pull request #75 from hack4impact-uiuc/editableBy-is-viewableBy…
Browse files Browse the repository at this point in the history
…-default

EditableBy has viewable by default
  • Loading branch information
daniel-moon32 authored May 5, 2021
2 parents 04ac7e3 + ac6131e commit 51df289
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/api/notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ router.get(
notes = await Note.find({}).lean();
} else {
notes = await Note.find({
'metaData.access.viewableBy': { $in: [req.user._id.toString()] },
$or: [
{ 'metaData.access.viewableBy': { $in: [req.user._id.toString()] } },
{ 'metaData.access.editableBy': { $in: [req.user._id.toString()] } },
],
}).lean();
}

Expand Down

1 comment on commit 51df289

@vercel
Copy link

@vercel vercel bot commented on 51df289 May 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.