From 917c5c4923ee52d478caa31efddd1b7b06a96968 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Tue, 12 Sep 2017 00:10:02 -0700 Subject: [PATCH] Return updated collection on document create --- server/api/documents.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/api/documents.js b/server/api/documents.js index 178e590aa..3eb5efb83 100644 --- a/server/api/documents.js +++ b/server/api/documents.js @@ -211,6 +211,8 @@ router.post('documents.create', auth(), async ctx => { await ownerCollection.addDocumentToStructure(document, index); } + document.collection = ownerCollection; + ctx.body = { data: await presentDocument(ctx, document), };