fix: Unable to edit starred documents

closes #1275
This commit is contained in:
Tom Moor 2020-05-20 21:42:26 -07:00
parent 47ff6feaee
commit 218b0ea76a
2 changed files with 5 additions and 0 deletions

View File

@ -298,6 +298,10 @@ router.post('documents.starred', auth(), pagination(), async ctx => {
collectionId: collectionIds,
},
include: [
{
model: Collection,
as: 'collection',
},
{
model: Star,
as: 'starred',

View File

@ -955,6 +955,7 @@ describe('#documents.starred', async () => {
expect(res.status).toEqual(200);
expect(body.data.length).toEqual(1);
expect(body.data[0].id).toEqual(document.id);
expect(body.policies[0].abilities.update).toEqual(true);
});
it('should require authentication', async () => {