fix: Incorrect policy returned after document create/import

This commit is contained in:
Tom Moor
2021-02-09 21:29:24 -08:00
parent c0325fcaf3
commit 5a478ec127
2 changed files with 5 additions and 0 deletions

View File

@@ -1205,6 +1205,7 @@ router.post("documents.import", auth(), async (ctx) => {
user,
ip: ctx.request.ip,
});
document.collection = collection;
return (ctx.body = {
data: await presentDocument(document),
@@ -1275,6 +1276,7 @@ router.post("documents.create", auth(), async (ctx) => {
editorVersion,
ip: ctx.request.ip,
});
document.collection = collection;
return (ctx.body = {
data: await presentDocument(document),