Utils added extra

This commit is contained in:
Lynixenn
2025-03-30 21:57:15 +02:00
parent 0ecd265ade
commit 6e87e5003e
4 changed files with 2 additions and 163 deletions

View File

@@ -98,14 +98,13 @@ export async function ensureDatabaseExists(): Promise<void> {
console.log("Database file already exists");
} catch (error) {
if (error instanceof Deno.errors.NotFound) {
createDatabaseIfNotExist();
insertSamples();
// Nothing, file will be created below
} else {
throw error;
}
}
createDatabaseIfNotExist();
insertSamples();
} catch (error) {
console.error("Error ensuring database exists:", error);
throw error;