You've already forked obsidian-visualiser
Update DB schema to include an ID and split overview and content. Progressing on ContentEditor with the ID fixing many issues. Adding modal and sync features.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { getTableColumns } from 'drizzle-orm';
|
||||
import { explorerContentTable } from '~/db/schema';
|
||||
import { projectFilesTable } from '~/db/schema';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
const { user } = await getUserSession(e);
|
||||
|
||||
const db = useDatabase();
|
||||
const { content: _, ...columns } = getTableColumns(explorerContentTable);
|
||||
const content = db.select(columns).from(explorerContentTable).all();
|
||||
const content = db.select().from(projectFilesTable).all();
|
||||
|
||||
content.sort((a, b) => {
|
||||
return a.path.split('/').length - b.path.split('/').length;
|
||||
@@ -36,6 +34,5 @@ export default defineEventHandler(async (e) => {
|
||||
return content.filter(e => !!e);
|
||||
}
|
||||
|
||||
setResponseStatus(e, 404);
|
||||
return;
|
||||
return [];
|
||||
});
|
||||
Reference in New Issue
Block a user