Refactoring

This commit is contained in:
syuilo 2018-10-19 09:19:55 +09:00
parent 16ad232c40
commit 0a4015b8a2
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -66,7 +66,7 @@ router.get('/notes/:note', async (ctx, next) => {
const note = await Note.findOne({
_id: new mongo.ObjectID(ctx.params.note),
$or: [ { visibility: 'public' }, { visibility: 'home' } ]
visibility: { $in: ['public', 'home'] }
});
if (note === null) {