fix: use getRawDb() instead of drizzle $client for explore tab
$client doesn't exist in drizzle-orm 0.33, causing a TypeError and 500 on every /api/servers/explore request. Export the raw better-sqlite3 instance directly from db/index.ts instead.
This commit is contained in:
@@ -226,6 +226,10 @@ export function getDb(): DB {
|
||||
return db;
|
||||
}
|
||||
|
||||
export function getRawDb(): Database.Database {
|
||||
return sqlite;
|
||||
}
|
||||
|
||||
export function closeDatabase(): void {
|
||||
if (sqlite) {
|
||||
sqlite.close();
|
||||
|
||||
Reference in New Issue
Block a user