[www] Hide hidden documents from /documents

This commit is contained in:
Roman Timashev committed 2017-10-23 19:06:02 +03:00
1 parent 4b357e5987
commit 60c80e3eef
1 file changed
+1 -1
+1 -1
View File
@@ -57,7 +57,7 @@ async function bakeDocument(document) {
function getDocuments() {
return get('/documents', async ctx => {
const path = getPathWithNoTrailingSlash(ctx.path)
let documents = await Document.find({})
let documents = await Document.find({hidden: false})
if (documents) {
documents = await Promise.all(documents.map(bakeDocument))