You've already forked obsidian-visualiser
Fix login, registration and made the first database version.
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import useDatabase from "~/composables/useDatabase";
|
||||
import type { ProjectSearch } from "~/types/api";
|
||||
|
||||
export default defineEventHandler((e) => {
|
||||
const id = getRouterParam(e, 'id');
|
||||
|
||||
if(!id)
|
||||
{
|
||||
setResponseStatus(e, 400);
|
||||
return;
|
||||
}
|
||||
|
||||
const db = useDatabase();
|
||||
|
||||
return db.query(`SELECT p.*, count(f.path) as pages FROM explorer_projects p LEFT JOIN explorer_files f ON p.id = f.project WHERE p.owner = ?1`).all(id) as Omit<ProjectSearch, 'username'>[];
|
||||
});
|
||||
Reference in New Issue
Block a user