this should be validated
This commit is contained in:
@ -114,7 +114,6 @@ router.post('documents.create', auth(), async ctx => {
|
|||||||
|
|
||||||
if (!ownerCollection) throw httpErrors.BadRequest();
|
if (!ownerCollection) throw httpErrors.BadRequest();
|
||||||
|
|
||||||
// FIXME: should we validate the existance of parentDocument?
|
|
||||||
let parentDocumentObj = {};
|
let parentDocumentObj = {};
|
||||||
if (parentDocument && ownerCollection.type === 'atlas') {
|
if (parentDocument && ownerCollection.type === 'atlas') {
|
||||||
parentDocumentObj = await Document.findOne({
|
parentDocumentObj = await Document.findOne({
|
||||||
|
Reference in New Issue
Block a user