π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Backend optimizations
Veauville Raphaele9bffb86d37a
diff --git a/backend/classes/DocumentsManager.ts b/backend/classes/DocumentsManager.tsindex 8051c395..4fd620a4 100644--- a/backend/classes/DocumentsManager.ts+++ b/backend/classes/DocumentsManager.ts@@ -11,7 +11,9 @@ export default class DocumentsManager extends Base {// If all is true, return all documents, else return only public documents (accessibility = 1)return new Promise<Document[]>((resolve, reject) => {this.app.db.query<DocumentDB[]>(- `SELECT * FROM documents ${all == 'true' ? '' : 'WHERE `accessibility` = 1'} ORDER BY \`name\``,+ `SELECT id, name, description, tags, category, parent_id, accessibility, author_id, created_timestamp, updated_timestamp FROM documents ${+ all == 'true' ? '' : 'WHERE `accessibility` = 1'+ } ORDER BY \`name\``,(err, result) => {if (err) {console.log(err);