mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Fix tests
This commit is contained in:
parent
079cdcf7d7
commit
1b8a2d764c
1 changed files with 2 additions and 2 deletions
|
|
@ -8,8 +8,8 @@ function setPragma(db: Kysely<any>, pragma: string, value: string | number) {
|
|||
/** Get value of PRAGMA from the database. */
|
||||
async function getPragma(db: Kysely<any>, pragma: string) {
|
||||
const result = await sql.raw(`PRAGMA ${pragma}`).execute(db);
|
||||
const row = result.rows[0] as Record<string, unknown>;
|
||||
return row[pragma];
|
||||
const row = result.rows[0] as Record<string, unknown> | undefined;
|
||||
return row?.[pragma];
|
||||
}
|
||||
|
||||
export { getPragma, setPragma };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue