diff --git a/src/app/user/page.tsx b/src/app/user/page.tsx index e48d41a..1943ce0 100644 --- a/src/app/user/page.tsx +++ b/src/app/user/page.tsx @@ -1,21 +1,26 @@ -'use server'; import { db, schema } from '@/db'; import { faker } from '@faker-js/faker'; import * as argon2 from 'argon2'; +import { InferInsertModel } from 'drizzle-orm'; + +export const dynamic = 'force-dynamic'; export default async function page() { const pass = faker.internet.password(); const passwordHash = await argon2.hash(pass); - const result = await db - .insert(schema.user) - .values([ - { - id: Math.random() * 1000, - username: faker.internet.userName(), - eamil: faker.internet.email(), - passwordHash, - }, - ]); - console.log(result[0].insertId); - return