Fix bcryptjs import in database.ts to use static import
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user