I see this error with the app, reported by NextJS, please fix it. The er

This commit is contained in:
Indigo Tang 2025-07-06 12:14:03 +00:00
parent 1b3424655b
commit a7f4242ecc
5 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,4 @@
'use server';
import db from '@/lib/db'; import db from '@/lib/db';
import type { Toy, User } from '@/types'; import type { Toy, User } from '@/types';
import { mockOwnerProfiles } from '@/lib/mockData'; import { mockOwnerProfiles } from '@/lib/mockData';

View File

@ -61,8 +61,12 @@ function initDb() {
const insertManyUsers = db.transaction((users) => { const insertManyUsers = db.transaction((users) => {
for (const user of users) { for (const user of users) {
insertUser.run({ insertUser.run({
...user, id: user.id,
name: user.name,
email: `${user.id}@example.com`, // Generate mock email email: `${user.id}@example.com`, // Generate mock email
role: user.role,
avatarUrl: user.avatarUrl ?? null,
bio: user.bio ?? null
}); });
} }
}); });

BIN
toyshare.db Normal file

Binary file not shown.

BIN
toyshare.db-shm Normal file

Binary file not shown.

BIN
toyshare.db-wal Normal file

Binary file not shown.