Revoked share links (#664)

* Move to revokation API for share links

* Respect revoked share links
Add documentation for shares endpoints

* 💚
This commit is contained in:
Tom Moor
2018-06-16 12:36:25 -07:00
committed by GitHub
parent fad5976dd2
commit ae502c10c9
10 changed files with 190 additions and 20 deletions

View File

@ -165,7 +165,12 @@ router.post('documents.info', auth({ required: false }), async ctx => {
let document;
if (shareId) {
const share = await Share.findById(shareId, {
const share = await Share.find({
where: {
// $FlowFixMe
revokedAt: { [Op.eq]: null },
id: shareId,
},
include: [
{
model: Document,