Add endpoints for config setting

This commit is contained in:
Ajay
2025-04-08 15:18:32 -04:00
parent 2aa3589312
commit ac26aed21c
3 changed files with 15 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
import { db } from "../databases/databases";
export async function getServerConfig(key: string): Promise<string | null> {
const row = await db.prepare("run", `SELECT "value" FROM "config" WHERE "key" = ?`, [key]);
return row?.value ?? null;
}