From 60c80e3eef47272cce5966599448bbb6a9a71016 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Mon, 23 Oct 2017 19:06:02 +0300 Subject: [PATCH] [www] Hide hidden documents from /documents --- src/routes/documents.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/documents.js b/src/routes/documents.js index f65907cd..ee4b527a 100644 --- a/src/routes/documents.js +++ b/src/routes/documents.js @@ -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))