Return updated collection on document create

This commit is contained in:
Jori Lallo
2017-09-12 00:10:02 -07:00
parent f3cb17046d
commit 917c5c4923

View File

@ -211,6 +211,8 @@ router.post('documents.create', auth(), async ctx => {
await ownerCollection.addDocumentToStructure(document, index); await ownerCollection.addDocumentToStructure(document, index);
} }
document.collection = ownerCollection;
ctx.body = { ctx.body = {
data: await presentDocument(ctx, document), data: await presentDocument(ctx, document),
}; };