feat: store image metadata in sqlite and images on disk

This commit is contained in:
2025-01-05 21:27:31 +01:00
parent bf7d88a588
commit 20a2781214
18 changed files with 641 additions and 379 deletions

View File

@@ -22,13 +22,11 @@ export const savePerformance = async (url: string, seconds: number) => {
if (u.pathname.includes("_frsh/")) return;
u.searchParams.delete("__frsh_c");
console.log("Saving performance", u.pathname, u.search, seconds);
const res = await db.insert(performanceTable).values({
await db.insert(performanceTable).values({
path: decodeURIComponent(u.pathname),
search: u.search,
time: Math.floor(seconds * 1000),
});
console.log({ res });
};
export async function getPerformances(): Promise<PerformanceRes> {