Fix login, registration and made the first database version.

This commit is contained in:
2024-11-05 19:51:56 +01:00
parent 83ddaf19d4
commit 1af78e5ab7
35 changed files with 180 additions and 391 deletions

View File

@@ -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'>[];
});