From ed602f06f65a61a451192dbe3b07240e2131d87f Mon Sep 17 00:00:00 2001 From: Jason Jacobs Date: Thu, 14 Mar 2024 13:39:38 -0700 Subject: [PATCH] update hasDocs to use new pattern --- core/indexing/docs/db.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/indexing/docs/db.ts b/core/indexing/docs/db.ts index bde6ce980..151b220fb 100644 --- a/core/indexing/docs/db.ts +++ b/core/indexing/docs/db.ts @@ -142,11 +142,7 @@ export async function listDocs(): Promise< } export async function hasDoc(baseUrl: string) { - const db = await open({ - filename: getDocsSqlitePath(), - driver: sqlite3.Database, - }); - await createDocsTable(db); + const db = await getDBDocs(); const doc = await db.get(`SELECT title FROM docs WHERE baseUrl =?`, baseUrl); return!!doc; }