Cleanup AI slop and simplify db interface

This commit is contained in:
2026-01-12 18:51:09 -08:00
parent 88b6d1bade
commit 6664e6e3d1
16 changed files with 712 additions and 767 deletions

View File

@@ -1,6 +1,6 @@
import matter from 'gray-matter';
import { marked } from 'marked';
import { addToDatabase } from "../src/db/index";
import { dbConnection } from "../src/db";
// When the server starts, import all the blog post metadata into the database
// Executed on startup because it's included in <root> ./bunfig.toml
@@ -22,7 +22,7 @@ import { addToDatabase } from "../src/db/index";
}
const bodyHtml = await marked.parse(processedContent);
addToDatabase(route, data, bodyHtml);
dbConnection.addPost(route, data, bodyHtml);
}
console.log('Posts have been imported into db');