fix: Error in shares.info endpoint when requesting share record for deleted document

This commit is contained in:
Tom Moor
2020-09-03 23:22:41 -07:00
parent dd7436f78c
commit e8648d4611
2 changed files with 18 additions and 4 deletions

View File

@ -29,7 +29,7 @@ router.post("shares.info", auth(), async (ctx) => {
revokedAt: { [Op.eq]: null },
},
});
if (!share) {
if (!share || !share.document) {
throw new NotFoundError();
}