Fix bcryptjs import in database.ts to use static import

This commit is contained in:
Ryderjj89
2025-10-01 18:36:45 -04:00
parent 62ec5427da
commit 1e48717285

View File

@@ -2,6 +2,7 @@ import Database from 'better-sqlite3'
import { join } from 'path'
import { existsSync, mkdirSync } from 'fs'
import { dirname } from 'path'
import bcrypt from 'bcryptjs'
let db: Database.Database
@@ -53,7 +54,6 @@ async function initializeDatabase(db: Database.Database) {
// Create default admin user if it doesn't exist
const config = useRuntimeConfig()
const bcrypt = await import('bcryptjs')
const saltRounds = 10
const passwordHash = await bcrypt.hash(config.adminPassword, saltRounds)