update hasDocs to use new pattern
This commit is contained in:
parent
e8d126c6ee
commit
ed602f06f6
1 changed files with 1 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue