[www] Hide hidden documents from /documents
This commit is contained in:
1 parent
4b357e5987
commit
60c80e3eef
1 file changed
+1
-1
@@ -57,7 +57,7 @@ async function bakeDocument(document) {
|
|||||||
function getDocuments() {
|
function getDocuments() {
|
||||||
return get('/documents', async ctx => {
|
return get('/documents', async ctx => {
|
||||||
const path = getPathWithNoTrailingSlash(ctx.path)
|
const path = getPathWithNoTrailingSlash(ctx.path)
|
||||||
let documents = await Document.find({})
|
let documents = await Document.find({hidden: false})
|
||||||
|
|
||||||
if (documents) {
|
if (documents) {
|
||||||
documents = await Promise.all(documents.map(bakeDocument))
|
documents = await Promise.all(documents.map(bakeDocument))
|
||||||
|
|||||||
Reference in new issue
Block a user