From 76759ce37477460766f7b51aead97a7148fcbabc Mon Sep 17 00:00:00 2001 From: Leon Serfaty G Date: Mon, 1 Sep 2025 06:58:58 +0000 Subject: [PATCH] I see this error with the app, reported by NextJS, please fix it. The er --- scripts/seed.ts | 2 +- src/lib/db.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/seed.ts b/scripts/seed.ts index 26c68b8..61aa5a3 100644 --- a/scripts/seed.ts +++ b/scripts/seed.ts @@ -4,7 +4,7 @@ import Database from 'better-sqlite3'; const db = new Database('local.db'); function seed() { - console.log('Seeding database...'); + console.log('Seeding database with settings and email templates...'); // Create settings table if it doesn't exist db.exec(` diff --git a/src/lib/db.ts b/src/lib/db.ts index 03caad3..c8aa9e0 100644 --- a/src/lib/db.ts +++ b/src/lib/db.ts @@ -99,10 +99,10 @@ const userStmt = db.prepare('SELECT id FROM users WHERE email = ?'); const defaultUser = userStmt.get('admin@example.com'); if (!defaultUser) { const insertUser = db.prepare( - "INSERT INTO users (id, email, password, name) VALUES (?, ?, ?, ?)" + "INSERT INTO users (id, email, password, name, emailVerified) VALUES (?, ?, ?, ?, ?)" ); // Note: In a real app, hash the password! - insertUser.run('cl-admin-user-id', 'admin@example.com', 'password', 'Admin User'); + insertUser.run('cl-admin-user-id', 'admin@example.com', 'password', 'Admin User', Date.now()); console.log('Default user created.'); }