mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-26 17:38:28 +03:00
Add endpoints for config setting
This commit is contained in:
7
src/utils/serverConfig.ts
Normal file
7
src/utils/serverConfig.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user