generated from fahricansecer/boilerplate-be
23 lines
558 B
TypeScript
23 lines
558 B
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
|
|
const prisma = new PrismaClient();
|
|
|
|
async function test() {
|
|
try {
|
|
const newAnon = await prisma.user.create({
|
|
data: {
|
|
email: 'anonymous@contenthunter.system' + Date.now(),
|
|
password: 'system-anonymous-no-login',
|
|
firstName: 'Anonymous',
|
|
},
|
|
});
|
|
console.log("Success:", newAnon);
|
|
} catch (e: any) {
|
|
console.error("Prisma Error:", e);
|
|
} finally {
|
|
await prisma.$disconnect();
|
|
}
|
|
}
|
|
|
|
test();
|